-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
test(aws): move part of unit tests to integration #4884
Conversation
{ | ||
name: "try to call aws if cache is expired", | ||
options: flag.Options{ | ||
RegoOptions: flag.RegoOptions{SkipPolicyUpdate: true}, | ||
AWSOptions: flag.AWSOptions{ | ||
Region: "us-east-1", | ||
Services: []string{"s3"}, | ||
Account: "12345678", | ||
}, | ||
CloudOptions: flag.CloudOptions{ | ||
MaxCacheAge: time.Minute, | ||
}, | ||
}, | ||
cacheContent: "testdata/s3onlycache.json", | ||
expectErr: true, | ||
}, | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you miss moving this test case over?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simar7
This test was successful because an error occurred due to the lack of credentials. I don't think this test is relevant at the moment, because if the cache has expired, then this error is ignored and all passed services are scanned.
Head branch was pushed to by a user without write access
The PR was removed from the merge queue due to a failing test, but that test that failed seems unrelated === RUN TestContainerd_LocalImage
2023/08/02 11:30:04 🐳 Creating container for image ghcr.io/aquasecurity/trivy-test-images/containerd:latest
2023/08/02 11:30:04 ✅ Container created: e19a56b35e7d
2023/08/02 11:30:04 🐳 Starting container: e19a56b35e7d
2023/08/02 11:30:05 ✅ Container started: e19a56b35e7d
2023/08/02 11:30:05 🚧 Waiting for container id e19a56b35e7d image: ghcr.io/aquasecurity/trivy-test-images/containerd:latest. Waiting for: &{timeout:<nil> Log:containerd successfully booted Occurrence:1 PollInterval:100ms}
containerd_test.go:264:
Error Trace: /home/runner/work/trivy/trivy/pkg/fanal/test/integration/containerd_test.go:658
/home/runner/work/trivy/trivy/pkg/fanal/test/integration/containerd_test.go:264
Error: Received unexpected error:
failed to dial "/tmp/fanal3109783308/containerd/containerd.sock": connection error: desc = "transport: error while dialing: dial unix /tmp/fanal3109783308/containerd/containerd.sock: connect: permission denied"
Test: TestContainerd_LocalImage
2023/08/02 11:30:05 🐳 Terminating container: e19a56b35e7d
2023/08/02 11:30:05 🚫 Container terminated: e19a56b35e7d
--- FAIL: TestContainerd_LocalImage (0.74s) I'm going to try to requeue this PR for merging again. |
* test(aws): move part of unit tests to integration * fix typo * fix test --------- Co-authored-by: knqyf263 <knqyf263@gmail.com>
Description
Moved part of the unit tests that depend on the environment settings to the integration ones.
Related issues
Checklist