Commit Graph

7 Commits

Author SHA1 Message Date
David Fridrich e659256005
chore: use lower case *functions* in all CLI outputs (#1135)
* 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
2022-07-27 13:34:36 +00:00
Luke Kingland 9a0335de7d
src: exported client constructor with options (#883)
* 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.
2022-03-30 00:58:46 +00:00
Matej Vasek cad0a04276
Enabled previously disabled git tests for Window (#909)
* 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>
2022-03-17 03:20:48 -07:00
Matej Vasek 663fd29b76
Windows unit test fixes (#860)
* 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>
2022-02-27 17:53:07 -08:00
Luke Kingland ccf00152be
feat: function version migrations (#664)
* feat: function version migrations

* unmarshall functin now part of initialization

* regenerate schema

* spelling errors
2021-11-24 04:50:27 -08:00
Matej Vasek 3ae08b01af
Refactor tests (#658)
* src: refactor tests

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* src: add comments

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* src: fix style

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-11-14 17:15:54 -08:00
Luke Kingland e1fa1ad3c7
chore: test helpers relocation (#653)
* 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
2021-11-12 05:39:37 -08:00