diff options
author | baude <bbaude@redhat.com> | 2018-06-27 09:01:11 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-06-27 15:16:02 +0000 |
commit | c32c491869c58e9b0f70ebc58221c28b342f1e1d (patch) | |
tree | 8e79d821bb0d6463bcbaa641151edd1aaa7af195 | |
parent | e1b47c15076680d318aa6fd0cb650ad89b471022 (diff) | |
download | podman-c32c491869c58e9b0f70ebc58221c28b342f1e1d.tar.gz podman-c32c491869c58e9b0f70ebc58221c28b342f1e1d.tar.bz2 podman-c32c491869c58e9b0f70ebc58221c28b342f1e1d.zip |
generator.New() requires an OS string input variable
Signed-off-by: baude <bbaude@redhat.com>
Closes: #1007
Approved by: baude
-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 { |