2021-07-02 08:56:50 +03:00
|
|
|
package validate
|
|
|
|
|
|
|
|
// ValidateTests is E2E Test Config for validation
|
|
|
|
var ValidateTests = []struct {
|
|
|
|
//TestName - Name of the Test
|
|
|
|
TestName string
|
2021-08-21 00:44:19 +03:00
|
|
|
// PolicyRaw - The Yaml file of the ClusterPolicy
|
|
|
|
PolicyRaw []byte
|
|
|
|
// ResourceRaw - The Yaml file of the ClusterPolicy
|
|
|
|
ResourceRaw []byte
|
2021-07-02 08:56:50 +03:00
|
|
|
// ResourceNamespace - Namespace of the Resource
|
|
|
|
ResourceNamespace string
|
2021-08-21 00:44:19 +03:00
|
|
|
// MustSucceed declares if test case must fail on validation
|
|
|
|
MustSucceed bool
|
2021-07-02 08:56:50 +03:00
|
|
|
}{
|
|
|
|
{
|
2021-08-21 00:44:19 +03:00
|
|
|
TestName: "test-validate-with-flux-and-variable-substitution-2043",
|
|
|
|
PolicyRaw: kyverno_2043_policy,
|
|
|
|
ResourceRaw: kyverno_2043_FluxKustomization,
|
2021-07-02 08:56:50 +03:00
|
|
|
ResourceNamespace: "test-validate",
|
2021-08-21 00:44:19 +03:00
|
|
|
MustSucceed: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
TestName: "test-validate-with-flux-and-variable-substitution-2241",
|
|
|
|
PolicyRaw: kyverno_2241_policy,
|
|
|
|
ResourceRaw: kyverno_2241_FluxKustomization,
|
|
|
|
ResourceNamespace: "test-validate",
|
|
|
|
MustSucceed: true,
|
2021-07-02 08:56:50 +03:00
|
|
|
},
|
|
|
|
}
|