mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
inital seccomp support
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
@@ -152,6 +152,16 @@ func TestParseSecurityOpt(t *testing.T) {
|
||||
t.Fatalf("Unexpected AppArmorProfile, expected: \"test_profile\", got %q", container.AppArmorProfile)
|
||||
}
|
||||
|
||||
// test seccomp
|
||||
sp := "/path/to/seccomp_test.json"
|
||||
config.SecurityOpt = []string{"seccomp:" + sp}
|
||||
if err := parseSecurityOpt(container, config); err != nil {
|
||||
t.Fatalf("Unexpected parseSecurityOpt error: %v", err)
|
||||
}
|
||||
if container.SeccompProfile != sp {
|
||||
t.Fatalf("Unexpected AppArmorProfile, expected: %q, got %q", sp, container.SeccompProfile)
|
||||
}
|
||||
|
||||
// test valid label
|
||||
config.SecurityOpt = []string{"label:user:USER"}
|
||||
if err := parseSecurityOpt(container, config); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user