diff options
-rw-r--r-- | libpod/common_test.go | 5 | ||||
-rw-r--r-- | pkg/spec/spec.go | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libpod/common_test.go b/libpod/common_test.go index a95d73926..496b8d17a 100644 --- a/libpod/common_test.go +++ b/libpod/common_test.go @@ -75,7 +75,10 @@ func getTestContainer(id, name, locksDir string) (*Container, error) { valid: true, } - g := generate.New() + g, err := generate.New("linux") + if err != nil { + return nil, err + } ctr.config.Spec = g.Spec() ctr.config.Labels["test"] = "testing" diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index 565c07014..d407b419a 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -21,7 +21,10 @@ const cpuPeriod = 100000 // CreateConfigToOCISpec parses information needed to create a container into an OCI runtime spec func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint cgroupPerm := "ro" - g := generate.New() + g, err := generate.New("linux") + if err != nil { + return nil, err + } g.HostSpecific = true addCgroup := true if config.Privileged { |