mirror of
https://github.com/docker/cli.git
synced 2026-01-26 15:41:42 +03:00
Signed-off-by: Antonio Murdaca <runcom@redhat.com> Upstream-commit: 5ff21add06ce0e502b41a194077daad311901996 Component: engine
33 lines
552 B
Go
33 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)
|
|
}
|
|
}
|