mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Add unit test to ensure no error thrown
This commit is contained in:
parent
080b49276e
commit
49fe9d1b41
@ -200,6 +200,16 @@ func TestInterPodAffinityAdmission(t *testing.T) {
|
||||
},
|
||||
errorExpected: true,
|
||||
},
|
||||
{
|
||||
affinity: map[string]string{
|
||||
api.AffinityAnnotationKey: `
|
||||
{"podAntiAffinity": {
|
||||
"thisIsAInvalidAffinity": [{}
|
||||
}}`,
|
||||
},
|
||||
// however, we should not got error here
|
||||
errorExpected: false,
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
pod.ObjectMeta.Annotations = test.affinity
|
||||
|
Loading…
Reference in New Issue
Block a user