1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/profiles/seccomp/seccomp_test.go
Antonio Murdaca 5ff21add06
New seccomp format
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-01 11:53:07 +02:00

32 lines
552 B
Go

// +build linux
package seccomp
import (
"io/ioutil"
"testing"
"github.com/docker/docker/oci"
)
func TestLoadProfile(t *testing.T) {
f, err := ioutil.ReadFile("fixtures/example.json")
if err != nil {
t.Fatal(err)
}
rs := oci.DefaultSpec()
if _, err := LoadProfile(string(f), &rs); err != nil {
t.Fatal(err)
}
}
func TestLoadDefaultProfile(t *testing.T) {
f, err := ioutil.ReadFile("default.json")
if err != nil {
t.Fatal(err)
}
rs := oci.DefaultSpec()
if _, err := LoadProfile(string(f), &rs); err != nil {
t.Fatal(err)
}
}