@@ -67,37 +67,29 @@ func TestGeneratePodSandboxLinuxConfigSeccomp(t *testing.T) {
67
67
expectedProfile string
68
68
}{
69
69
{
70
- description : "no seccomp defined at pod level should return empty " ,
71
- pod : newSeccompPod (nil , nil , "" , "" ),
72
- expectedProfile : "" ,
70
+ description : "no seccomp defined at pod level should return runtime/default " ,
71
+ pod : newSeccompPod (nil , nil , "" , "runtime/default " ),
72
+ expectedProfile : "runtime/default " ,
73
73
},
74
74
{
75
- description : "seccomp field defined at pod level should be honoured" ,
76
- pod : newSeccompPod (& v1.SeccompProfile {Type : v1 .SeccompProfileTypeRuntimeDefault }, nil , "" , "" ),
75
+ description : "seccomp field defined at pod level should not be honoured" ,
76
+ pod : newSeccompPod (& v1.SeccompProfile {Type : v1 .SeccompProfileTypeUnconfined }, nil , "" , "" ),
77
77
expectedProfile : "runtime/default" ,
78
78
},
79
79
{
80
80
description : "seccomp field defined at container level should not be honoured" ,
81
- pod : newSeccompPod (nil , & v1.SeccompProfile {Type : v1 .SeccompProfileTypeRuntimeDefault }, "" , "" ),
82
- expectedProfile : "" ,
81
+ pod : newSeccompPod (nil , & v1.SeccompProfile {Type : v1 .SeccompProfileTypeUnconfined }, "" , "" ),
82
+ expectedProfile : "runtime/default " ,
83
83
},
84
84
{
85
- description : "seccomp annotation defined at pod level should be honoured" ,
86
- pod : newSeccompPod (nil , nil , v1 . SeccompProfileRuntimeDefault , "" ),
85
+ description : "seccomp annotation defined at pod level should not be honoured" ,
86
+ pod : newSeccompPod (nil , nil , "unconfined" , "" ),
87
87
expectedProfile : "runtime/default" ,
88
88
},
89
89
{
90
90
description : "seccomp annotation defined at container level should not be honoured" ,
91
- pod : newSeccompPod (nil , nil , "" , v1 .SeccompProfileRuntimeDefault ),
92
- expectedProfile : "" ,
93
- },
94
- {
95
- description : "prioritise pod field over pod annotation" ,
96
- pod : newSeccompPod (& v1.SeccompProfile {
97
- Type : v1 .SeccompProfileTypeLocalhost ,
98
- LocalhostProfile : pointer .StringPtr ("pod-field" ),
99
- }, nil , "localhost/pod-annotation" , "" ),
100
- expectedProfile : "localhost/" + filepath .Join (fakeSeccompProfileRoot , "pod-field" ),
91
+ pod : newSeccompPod (nil , nil , "" , "unconfined" ),
92
+ expectedProfile : "runtime/default" ,
101
93
},
102
94
}
103
95
0 commit comments