Support unconfined apparmor

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
This commit is contained in:
Yanqiang Miao
2017-10-03 23:19:32 +08:00
parent a7471d79ab
commit 9f656cdda4
2 changed files with 14 additions and 2 deletions

View File

@@ -805,6 +805,17 @@ func TestGenerateApparmorSpecOpts(t *testing.T) {
profile: "",
privileged: true,
},
"should not return error if apparmor is unconfined when apparmor is not supported": {
profile: unconfinedProfile,
disable: true,
},
"should not apparmor when apparmor is unconfined": {
profile: unconfinedProfile,
},
"should not apparmor when apparmor is unconfined and privileged is true": {
profile: unconfinedProfile,
privileged: true,
},
"should set default apparmor when apparmor is runtime/default": {
profile: runtimeDefault,
specOpts: apparmor.WithDefaultProfile(appArmorDefaultProfileName),