Closed rpothier closed 1 year ago
Code Climate has analyzed commit 7a6467d0 and detected 0 issues on this pull request.
The test coverage on the diff in this pull request is 100.0% (50% is the threshold).
This pull request will bring the total coverage in the repository to 88.2% (0.0% change).
View more on Code Climate.
Desired Outcome
Unit tests should pass every time.
The test TestRunSecretsProvider can be flaky as the timing may be off by one as below.
[2023-06-22T19:53:17.382Z] provide_conjur_secrets_test.go:318: [2023-06-22T19:53:17.382Z] Error Trace: /secrets-provider-for-k8s/pkg/secrets/provide_conjur_secrets_test.go:318 [2023-06-22T19:53:17.382Z] Error: Not equal: [2023-06-22T19:53:17.382Z] expected: 7 [2023-06-22T19:53:17.382Z] actual : 6 [2023-06-22T19:53:17.382Z] Test: TestRunSecretsProvider/sidecar_container,_happy_path,_no_targets_updated
Implemented Changes
The duration time of the tests are currently 10 msec, which was used to keep the tests as fast as possible. However these short duration times are not what will be used in practice, and also any small processing delays can add up and cause the test to run quicker or slower than expected. Increasing the test times are more realistic. These changes add less than 10 seconds to the total unit test run time.
Connected Issue/Story
Resolves #[relevant GitHub issue(s), e.g. 76]
CyberArk internal issue ID: CNJR-1833
Definition of Done
At least 1 todo must be completed in the sections below for the PR to be merged.
Changelog
Test coverage
Documentation
README
s) were updated in this PRBehavior
Security