All tests which are directory-sensitive now also:
- reset viper
- use t.Cleanup
- use t.TempDir
- use a clean XDG_CONFIG_HOME
- specify explict name when creating
- moves helpers to root_test
* first run, F -> f
* fix
* fix
* misspells
* client*.go files
* add client*.go: misspells
* cmd dir test files
* docker dir
* function* files
* i*.go and job.go
* job.go,mock dir,repos*,s2i dir,schema dir,templates*
* test dir
* testing dir
* root dir *.go second round
* update root and version structure and help text
* fix: limit openshift int test with tag
* refactor: commands to use simplifed, unified constructor
* fix ineffectual assignment lint error
* cleanup
* add repository to run command
* callout for forthcoming s2i builder impl
* lint errors
* re-add the deferred client factory
* remove setNamespaceFlag now that it is persistent
* avoid side-effect of global-mutating deploy tests
* reduce line-by-line difference for PR ease
* simplificaiton of tests and comment lines for further PR ease purposes
* reduce inconsequential differences for ease of PR
* tests to RootCommandConfig
* review comment updates
* fix lint errors
* replace stdlib Setenv in tests
Using t.Setenv will require an update to go1.17, which is out of scope
for this PR.
* pass ClientFactory throughout
* explicitly empty test command args
See https://github.com/spf13/cobra/pull/155
Errors can still be encountered when, for example, using precomiled
tests. Explicitly setting constructed command args to the empty slice
ensures we avoid hitting any futher edge cases.
* Recreate git repo from scratch
Recreated the repo by `git init --bare` and commited template there all
over again.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Enable previously disabled tests for Windows
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Use git HTTP protocol not file protocol in tests
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: cleanup
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* force run of `make test`
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix git file:// URIs
When using file:// forward slashes should be used.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix parsing of FS path from URI path
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* disable some test on Windows
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: style
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* disable some test on Windows
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix some tests for Windows
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* disable some test on Windows
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* chore: test helpers relocation
The knative automations run test with all tags set simultaneously. This
causes collisions when using tags to separate sets. This commit moves
all helper functions in the function_test package into a file with no
build tags such that any combination of tags will work.
* src: move test helpers into their own package
* src: spelling and language tweaks