Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Include windows and mac host in CI to run kam unit and e2e test #74

Open
amitkrout opened this issue Oct 28, 2020 · 4 comments
Open

Include windows and mac host in CI to run kam unit and e2e test #74

amitkrout opened this issue Oct 28, 2020 · 4 comments
Labels
kind/enhancement New feature or request

Comments

@amitkrout
Copy link
Contributor

amitkrout commented Oct 28, 2020

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.

@amitkrout amitkrout added the kind/enhancement New feature or request label Oct 28, 2020
@amitkrout
Copy link
Contributor Author

Run kam unit test in CI

  • Windows
  • macOS

@amitkrout amitkrout changed the title Include windows and mac host to run kam test Include windows and mac host to run kam unit test Oct 28, 2020
@amitkrout amitkrout changed the title Include windows and mac host to run kam unit test Include windows and mac host in CI to run kam unit test Oct 28, 2020
@bigkevmcd
Copy link
Contributor

Can you attach the error message to the issue?

@amitkrout
Copy link
Contributor Author

amitkrout commented Oct 30, 2020

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

Details - #73

@amitkrout amitkrout changed the title Include windows and mac host in CI to run kam unit test Include windows and mac host in CI to run kam unit and e2e test Jul 28, 2021
@keithchong
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants