Skip to content

Commit

Permalink
verify that certificates are not used in ToolchainClusters (codeready…
Browse files Browse the repository at this point in the history
  • Loading branch information
MatousJobanek authored Jun 14, 2024
1 parent 2e9e8f8 commit 6147bdb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/e2e/toolchaincluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func verifyToolchainCluster(t *testing.T, await *wait.Awaitility, otherAwait *wa
secretRef(secretCopy.Name),
owner(current.Labels["ownerClusterName"]),
namespace(current.Labels["namespace"]),
disableTLS(current.Spec.DisabledTLSValidations),
capacityExhausted, // make sure this cluster cannot be used in other e2e tests
)

Expand Down Expand Up @@ -107,6 +108,7 @@ func verifyToolchainCluster(t *testing.T, await *wait.Awaitility, otherAwait *wa
secretRef(secretCopy.Name),
owner(current.Labels["ownerClusterName"]),
namespace(current.Labels["namespace"]),
disableTLS(current.Spec.DisabledTLSValidations),
capacityExhausted, // make sure this cluster cannot be used in other e2e tests
)

Expand Down Expand Up @@ -215,3 +217,10 @@ func caBundle(bundle string) clusterOption {
c.Spec.CABundle = bundle
}
}

// disableTLS sets the DisabledTLSValidations field
func disableTLS(validations []toolchainv1alpha1.TLSValidation) clusterOption {
return func(c *toolchainv1alpha1.ToolchainCluster) {
c.Spec.DisabledTLSValidations = validations
}
}

0 comments on commit 6147bdb

Please sign in to comment.