Open amitkrout opened 4 years ago
Run kam unit test in CI
Can you attach the error message to the issue?
Can you attach the error message to the issue?
$ make test
go test -mod=readonly ./...
? github.com/redhat-developer/kam/cmd/kam [no test files]
ok github.com/redhat-developer/kam/pkg/cmd 5.787s
ok github.com/redhat-developer/kam/pkg/cmd/environment 3.320s
? github.com/redhat-developer/kam/pkg/cmd/genericclioptions [no test files]
ok github.com/redhat-developer/kam/pkg/cmd/service 4.843s
ok github.com/redhat-developer/kam/pkg/cmd/ui (cached)
ok github.com/redhat-developer/kam/pkg/cmd/utility (cached)
? github.com/redhat-developer/kam/pkg/cmd/version [no test files]
ok github.com/redhat-developer/kam/pkg/cmd/webhook 7.523s
ok github.com/redhat-developer/kam/pkg/pipelines 15.291s
ok github.com/redhat-developer/kam/pkg/pipelines/argocd 2.650s
? github.com/redhat-developer/kam/pkg/pipelines/argocd/operator/v1alpha1 [no test files]
? github.com/redhat-developer/kam/pkg/pipelines/argocd/v1alpha1 [no test files]
? github.com/redhat-developer/kam/pkg/pipelines/clientconfig [no test files]
ok github.com/redhat-developer/kam/pkg/pipelines/config 2.148s
ok github.com/redhat-developer/kam/pkg/pipelines/deployment (cached)
ok github.com/redhat-developer/kam/pkg/pipelines/dryrun (cached)
ok github.com/redhat-developer/kam/pkg/pipelines/environments 6.482s
ok github.com/redhat-developer/kam/pkg/pipelines/eventlisteners 2.416s
ok github.com/redhat-developer/kam/pkg/pipelines/git 4.508s
? github.com/redhat-developer/kam/pkg/pipelines/helper [no test files]
ok github.com/redhat-developer/kam/pkg/pipelines/imagerepo 2.668s
? github.com/redhat-developer/kam/pkg/pipelines/ioutils [no test files]
ok github.com/redhat-developer/kam/pkg/pipelines/meta (cached)
ok github.com/redhat-developer/kam/pkg/pipelines/namespaces (cached)
? github.com/redhat-developer/kam/pkg/pipelines/pipelines [no test files]
ok github.com/redhat-developer/kam/pkg/pipelines/resources (cached)
ok github.com/redhat-developer/kam/pkg/pipelines/roles (cached)
ok github.com/redhat-developer/kam/pkg/pipelines/routes (cached)
ok github.com/redhat-developer/kam/pkg/pipelines/scm 1.221s
ok github.com/redhat-developer/kam/pkg/pipelines/secrets (cached)
ok github.com/redhat-developer/kam/pkg/pipelines/statustracker (cached)
ok github.com/redhat-developer/kam/pkg/pipelines/tasks (cached)
ok github.com/redhat-developer/kam/pkg/pipelines/triggers (cached)
ok github.com/redhat-developer/kam/pkg/pipelines/webhook 0.901s
--- FAIL: TestWriteResources (0.03s)
--- FAIL: TestWriteResources/Path_without_permission (0.00s)
resources_test.go:45: error mismatch: got failed to MkDirAll for /test/myfile.yaml: mkdir /test: read-only file system, want failed to MkDirAll for /test/myfile.yaml: mkdir /test: permission denied
FAIL
FAIL github.com/redhat-developer/kam/pkg/pipelines/yaml 1.008s
? github.com/redhat-developer/kam/tools/cmd-docs [no test files]
FAIL
make: *** [test] Error 1
FWIW, I saw several errors on Windows. One of which is:
--- FAIL: TestMakeScriptWithArgo (0.14s) dryrun_test.go:44: fork/exec C:\Users\Admin\temp\gnome911315027\dryrun_script.sh: %1 is not a valid Win32 application. --- FAIL: TestMakeScriptWithoutArgo (0.09s) dryrun_test.go:60: fork/exec C:\Users\Admin\temp\gnome728220054\dryrun_script.sh: %1 is not a valid Win32 application.
and there are differences in slashes, so the test case will need to account for this difference.
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Unit test throws error on my mac host. We need to integrate mac and windows in our CI to validate kam binary on these supported platform.
Describe the solution you'd like A clear and concise description of what you want to happen.
Each kam pr should be verified on mac and windows platform too.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Include windows and mac in CI. Additional context Add any other context or screenshots about the feature request here.