github.com/DaoCloud/dao@v0.0.0-20161212064103-c3dbfd13ee36/profiles/seccomp/seccomp_test.go (about) 1 // +build linux 2 3 package seccomp 4 5 import ( 6 "io/ioutil" 7 "testing" 8 ) 9 10 func TestLoadProfile(t *testing.T) { 11 f, err := ioutil.ReadFile("fixtures/example.json") 12 if err != nil { 13 t.Fatal(err) 14 } 15 if _, err := LoadProfile(string(f)); err != nil { 16 t.Fatal(err) 17 } 18 } 19 20 func TestLoadDefaultProfile(t *testing.T) { 21 f, err := ioutil.ReadFile("default.json") 22 if err != nil { 23 t.Fatal(err) 24 } 25 if _, err := LoadProfile(string(f)); err != nil { 26 t.Fatal(err) 27 } 28 }