plugins/vendor/github.com/Microsoft/hcsshim/test/functional/utilities/defaultlinuxspec.go
Nathan Gieseker 9a429d8d25 Windows: Updates Windows Vendoring
Updates windows dependent libraries for vendoing.
2019-01-23 18:43:18 -08:00

22 lines
522 B
Go

package testutilities
import (
"encoding/json"
"io/ioutil"
"testing"
specs "github.com/opencontainers/runtime-spec/specs-go"
)
func GetDefaultLinuxSpec(t *testing.T) *specs.Spec {
content, err := ioutil.ReadFile(`assets\defaultlinuxspec.json`)
if err != nil {
t.Fatalf("failed to read defaultlinuxspec.json: %s", err.Error())
}
spec := specs.Spec{}
if err := json.Unmarshal(content, &spec); err != nil {
t.Fatalf("failed to unmarshal contents of defaultlinuxspec.json: %s", err.Error())
}
return &spec
}