-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
add missing unit test case for warn mode verification policy. #6717
Conversation
Skipping CI for Draft Pull Request. |
/assign @lbernick |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
test/trustedresources.go
Outdated
@@ -116,7 +116,8 @@ func SetupTrustedResourceConfig(ctx context.Context, verificationNoMatchPolicy s | |||
// This function helps to setup 3 kinds of VerificationPolicies: | |||
// 1. One public key in inline data | |||
// 2. One public key in secret | |||
// 3. 2 authorities referring to the same secret. This is to test and make sure we don't have duplicate counts | |||
// 3. wrong inline key |
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.
I don't understand the reason for this comment change
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.
this comment was wrong, so I updated it reflect the current case
/hold |
9b8e5fc
to
251d43b
Compare
251d43b
to
5150381
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lbernick The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign |
test/trustedresources.go
Outdated
@@ -116,7 +116,8 @@ func SetupTrustedResourceConfig(ctx context.Context, verificationNoMatchPolicy s | |||
// This function helps to setup 3 kinds of VerificationPolicies: |
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.
nit: 4
5150381
to
0483d22
Compare
/lgtm |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
This commit adds missing unit test case for warn mode verification policy. Signed-off-by: Yongxuan Zhang [email protected]
0483d22
to
6243d1f
Compare
name: "warn no policies", | ||
requester: requesterUnmatched, | ||
verificationNoMatchPolicy: config.WarnNoMatchPolicy, | ||
pipelinerun: pr, | ||
policies: []*v1alpha1.VerificationPolicy{}, | ||
expected: unsignedPipeline, | ||
expectedRefSource: noMatchPolicyRefSource, | ||
}, { | ||
name: "ignore no policies", |
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.
This is removed as suggested #6691 (comment), same for taskref_test.go
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.
Thanks for the clarifications!
/lgtm |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
Changes
This commit adds missing unit test case for warn mode verification
policy.
/kind misc
Signed-off-by: Yongxuan Zhang [email protected]
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes