Change docker/default to runtime/default

This commit is contained in:
Zhen Wang
2018-04-19 10:39:53 -07:00
parent 3856891198
commit e102633ae8
14 changed files with 75 additions and 25 deletions

View File

@@ -231,20 +231,35 @@ func TestGetSeccompProfileFromAnnotations(t *testing.T) {
containerName: "container1",
expectedProfile: "",
},
{
description: "pod runtime/default seccomp profile should return runtime/default",
annotation: map[string]string{
v1.SeccompPodAnnotationKey: v1.SeccompProfileRuntimeDefault,
},
expectedProfile: v1.SeccompProfileRuntimeDefault,
},
{
description: "pod docker/default seccomp profile should return docker/default",
annotation: map[string]string{
v1.SeccompPodAnnotationKey: "docker/default",
v1.SeccompPodAnnotationKey: v1.DeprecatedSeccompProfileDockerDefault,
},
expectedProfile: "docker/default",
expectedProfile: v1.DeprecatedSeccompProfileDockerDefault,
},
{
description: "pod runtime/default seccomp profile with containerName should return runtime/default",
annotation: map[string]string{
v1.SeccompPodAnnotationKey: v1.SeccompProfileRuntimeDefault,
},
containerName: "container1",
expectedProfile: v1.SeccompProfileRuntimeDefault,
},
{
description: "pod docker/default seccomp profile with containerName should return docker/default",
annotation: map[string]string{
v1.SeccompPodAnnotationKey: "docker/default",
v1.SeccompPodAnnotationKey: v1.DeprecatedSeccompProfileDockerDefault,
},
containerName: "container1",
expectedProfile: "docker/default",
expectedProfile: v1.DeprecatedSeccompProfileDockerDefault,
},
{
description: "pod unconfined seccomp profile should return unconfined",