mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
added policy name for mutate policies
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
This commit is contained in:
parent
087b4330d4
commit
aa93ccf4d7
1 changed files with 7 additions and 0 deletions
|
@ -8,27 +8,33 @@ var MutateTests = []struct {
|
||||||
Data []byte
|
Data []byte
|
||||||
// ResourceNamespace - Namespace of the Resource
|
// ResourceNamespace - Namespace of the Resource
|
||||||
ResourceNamespace string
|
ResourceNamespace string
|
||||||
|
// PolicyName - Name of the Policy
|
||||||
|
PolicyName string
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
TestName: "test-mutate-with-context",
|
TestName: "test-mutate-with-context",
|
||||||
Data: configMapMutationYaml,
|
Data: configMapMutationYaml,
|
||||||
ResourceNamespace: "test-mutate",
|
ResourceNamespace: "test-mutate",
|
||||||
|
PolicyName: "mutate-policy",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
TestName: "test-mutate-with-logic-in-context",
|
TestName: "test-mutate-with-logic-in-context",
|
||||||
Data: configMapMutationWithContextLogicYaml,
|
Data: configMapMutationWithContextLogicYaml,
|
||||||
ResourceNamespace: "test-mutate",
|
ResourceNamespace: "test-mutate",
|
||||||
|
PolicyName: "mutate-policy",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
TestName: "test-mutate-with-context-label-selection",
|
TestName: "test-mutate-with-context-label-selection",
|
||||||
Data: configMapMutationWithContextLabelSelectionYaml,
|
Data: configMapMutationWithContextLabelSelectionYaml,
|
||||||
ResourceNamespace: "test-mutate",
|
ResourceNamespace: "test-mutate",
|
||||||
|
PolicyName: "mutate-policy",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var ingressTests = struct {
|
var ingressTests = struct {
|
||||||
testNamesapce string
|
testNamesapce string
|
||||||
cpol []byte
|
cpol []byte
|
||||||
|
policyName string
|
||||||
tests []struct {
|
tests []struct {
|
||||||
testName string
|
testName string
|
||||||
group, version, rsc, resourceName string
|
group, version, rsc, resourceName string
|
||||||
|
@ -37,6 +43,7 @@ var ingressTests = struct {
|
||||||
}{
|
}{
|
||||||
testNamesapce: "test-ingress",
|
testNamesapce: "test-ingress",
|
||||||
cpol: mutateIngressCpol,
|
cpol: mutateIngressCpol,
|
||||||
|
policyName: "mutate-ingress-host",
|
||||||
tests: []struct {
|
tests: []struct {
|
||||||
testName string
|
testName string
|
||||||
group, version, rsc, resourceName string
|
group, version, rsc, resourceName string
|
||||||
|
|
Loading…
Add table
Reference in a new issue