Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test on the main branch are failing. #515

Closed
v0lkan opened this issue Feb 12, 2024 · 2 comments
Closed

Unit test on the main branch are failing. #515

v0lkan opened this issue Feb 12, 2024 · 2 comments
Assignees
Labels
bug Something isn't working quality

Comments

@v0lkan
Copy link
Contributor

v0lkan commented Feb 12, 2024

Although the system looks healthy and the integration tests pass, the unit test fail with the following reason:

2024/02/12 08:30:42 Logger.CreateLogServer error creating log server: listen tcp :50051: bind: address already in use
panic: Fail in goroutine after TestCreateLogServer has completed

goroutine 57 [running]:
testing.(*common).Fail(0xc00008ad00)
        /usr/local/go/src/testing/testing.go:952 +0xd4
testing.(*common).FailNow(0xc00008ad00)
        /usr/local/go/src/testing/testing.go:975 +0x26
testing.(*common).Fatalf(0xc00008ad00, {0x96fa52?, 0xc0000d2240?}, {0xc0000507c0?, 0xc000050790?, 0xc0000507d0?})
        /usr/local/go/src/testing/testing.go:1083 +0x5e
github.com/vmware-tanzu/secrets-manager/app/sentinel/logger.TestCreateLogServer.func1()
        /home/aegis/WORKSPACE/VSecM/app/sentinel/logger/logger_test.go:62 +0x68
created by github.com/vmware-tanzu/secrets-manager/app/sentinel/logger.TestCreateLogServer in goroutine 56
        /home/aegis/WORKSPACE/VSecM/app/sentinel/logger/logger_test.go:60 +0x1a8
FAIL    github.com/vmware-tanzu/secrets-manager/app/sentinel/logger     0.011s
ok      github.com/vmware-tanzu/secrets-manager/core/audit      (cached)        coverage: 100.0% of statements
ok      github.com/vmware-tanzu/secrets-manager/core/crypto     (cached)        coverage: 64.1% of statements
ok      github.com/vmware-tanzu/secrets-manager/core/entity/data/v1     (cached)        coverage: 87.8% of statements
ok      github.com/vmware-tanzu/secrets-manager/core/entity/reqres/safe/v1      (cached)        coverage: [no statements] [no tests to run]
ok      github.com/vmware-tanzu/secrets-manager/core/env        (cached)        coverage: 84.1% of statements
ok      github.com/vmware-tanzu/secrets-manager/core/log        (cached)        coverage: 52.7% of statements
ok      github.com/vmware-tanzu/secrets-manager/core/probe      (cached)        coverage: 12.5% of statements
ok      github.com/vmware-tanzu/secrets-manager/core/system     (cached)        coverage: 0.0% of statements [no tests to run]
ok      github.com/vmware-tanzu/secrets-manager/core/template   (cached)        coverage: 90.0% of statements
?       github.com/vmware-tanzu/secrets-manager/examples/multiple-secrets       [no test files]
?       github.com/vmware-tanzu/secrets-manager/examples/multiple-secrets/busywait      [no test files]
?       github.com/vmware-tanzu/secrets-manager/examples/using-init-container   [no test files]
ok      github.com/vmware-tanzu/secrets-manager/core/validation (cached)        coverage: 100.0% of statements
?       github.com/vmware-tanzu/secrets-manager/examples/using-sdk      [no test files]
?       github.com/vmware-tanzu/secrets-manager/examples/using-sdk/helper/env   [no test files]
?       github.com/vmware-tanzu/secrets-manager/examples/using-sidecar  [no test files]
?       github.com/vmware-tanzu/secrets-manager/examples/using-sidecar/helper/env       [no test files]
ok      github.com/vmware-tanzu/secrets-manager/sdk/internal/timer      (cached)        coverage: 0.0% of statements [no tests to run]
ok      github.com/vmware-tanzu/secrets-manager/sdk/sentry      0.008s  coverage: 0.0% of statements [no tests to run]
ok      github.com/vmware-tanzu/secrets-manager/sdk/startup     0.007s  coverage: 0.0% of statements [no tests to run]
FAIL
Go unit tests failed, exiting.
make: *** [makefiles/Test.mk:44: test-local] Error 1

It looks like when we run make test-local a service on a gRPC port remains up, and we try to create another one, or something along those lines.

@v0lkan v0lkan added bug Something isn't working quality labels Feb 12, 2024
@sahinakyol
Copy link
Contributor

@v0lkan Could you assign to me?

@v0lkan
Copy link
Contributor Author

v0lkan commented Feb 17, 2024

Issue fixed. Closing.

Thanks for your contribution @sahinakyol .

@v0lkan v0lkan closed this as completed Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working quality
Projects
None yet
Development

No branches or pull requests

2 participants