-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Qi Wang <[email protected]>
- Loading branch information
Showing
23 changed files
with
101 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -450,30 +450,4 @@ tests: | |
policyType: PublicKey | ||
publicKey: | ||
keyData: Zm9vIGJhcg== | ||
- name: Should be able to create a minimal ClusterImagePolicy with policyType PKI | ||
initial: | | ||
apiVersion: config.openshift.io/v1alpha1 | ||
kind: ClusterImagePolicy | ||
spec: | ||
scopes: | ||
- example.com | ||
policy: | ||
rootOfTrust: | ||
policyType: PKI | ||
pki: | ||
caRootsData: Zm9vIGJhcg== | ||
pkiCertificateSubject: | ||
email: [email protected] | ||
expected: | | ||
apiVersion: config.openshift.io/v1alpha1 | ||
kind: ClusterImagePolicy | ||
spec: | ||
scopes: | ||
- example.com | ||
policy: | ||
rootOfTrust: | ||
policyType: PKI | ||
pki: | ||
caRootsData: Zm9vIGJhcg== | ||
pkiCertificateSubject: | ||
email: [email protected] | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -450,30 +450,4 @@ tests: | |
policyType: PublicKey | ||
publicKey: | ||
keyData: Zm9vIGJhcg== | ||
- name: Should be able to create a minimal ImagePolicy with policyType PKI | ||
initial: | | ||
apiVersion: config.openshift.io/v1alpha1 | ||
kind: ImagePolicy | ||
spec: | ||
scopes: | ||
- example.com | ||
policy: | ||
rootOfTrust: | ||
policyType: PKI | ||
pki: | ||
caRootsData: Zm9vIGJhcg== | ||
pkiCertificateSubject: | ||
email: [email protected] | ||
expected: | | ||
apiVersion: config.openshift.io/v1alpha1 | ||
kind: ImagePolicy | ||
spec: | ||
scopes: | ||
- example.com | ||
policy: | ||
rootOfTrust: | ||
policyType: PKI | ||
pki: | ||
caRootsData: Zm9vIGJhcg== | ||
pkiCertificateSubject: | ||
email: [email protected] | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,45 @@ tests: | |
pki: | ||
caRootsData: Zm9vIGJhcg== | ||
pkiCertificateSubject: | ||
email: [email protected] | ||
email: [email protected] | ||
- name: Should not allow policyType PKI but not set pki | ||
initial: | | ||
apiVersion: config.openshift.io/v1alpha1 | ||
kind: ImagePolicy | ||
spec: | ||
scopes: | ||
- example.com | ||
policy: | ||
rootOfTrust: | ||
policyType: PKI | ||
expectedError: "spec.policy.rootOfTrust: Invalid value: \"object\": pki is required when policyType is PKI, and forbidden otherwise" | ||
- name: Should not allow pkiCertificateSubject invalid email | ||
initial: | | ||
apiVersion: config.openshift.io/v1alpha1 | ||
kind: ImagePolicy | ||
spec: | ||
scopes: | ||
- example.com | ||
policy: | ||
rootOfTrust: | ||
policyType: PKI | ||
pki: | ||
caRootsData: Zm9vIGJhcg== | ||
pkiCertificateSubject: | ||
email: invalid-email | ||
expectedError: "spec.policy.rootOfTrust.pki.pkiCertificateSubject.email: Invalid value: \"string\": invalid email address in pkiCertificateSubject" | ||
- name: Should not allow pkiCertificateSubject invalid hostname | ||
initial: | | ||
apiVersion: config.openshift.io/v1alpha1 | ||
kind: ImagePolicy | ||
spec: | ||
scopes: | ||
- example.com | ||
policy: | ||
rootOfTrust: | ||
policyType: PKI | ||
pki: | ||
caRootsData: Zm9vIGJhcg== | ||
pkiCertificateSubject: | ||
hostname: invaild | ||
expectedError: "spec.policy.rootOfTrust.pki.pkiCertificateSubject.hostname: Invalid value: \"string\": invalid hostname in pkiCertificateSubject" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.