generator.New() requires an OS string input variable

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1007
Approved by: baude
This commit is contained in:
baude
2018-06-27 09:01:11 -05:00
committed by Atomic Bot
parent e1b47c1507
commit c32c491869
2 changed files with 8 additions and 2 deletions

View File

@ -75,7 +75,10 @@ func getTestContainer(id, name, locksDir string) (*Container, error) {
valid: true, valid: true,
} }
g := generate.New() g, err := generate.New("linux")
if err != nil {
return nil, err
}
ctr.config.Spec = g.Spec() ctr.config.Spec = g.Spec()
ctr.config.Labels["test"] = "testing" ctr.config.Labels["test"] = "testing"

View File

@ -21,7 +21,10 @@ const cpuPeriod = 100000
// CreateConfigToOCISpec parses information needed to create a container into an OCI runtime spec // CreateConfigToOCISpec parses information needed to create a container into an OCI runtime spec
func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
cgroupPerm := "ro" cgroupPerm := "ro"
g := generate.New() g, err := generate.New("linux")
if err != nil {
return nil, err
}
g.HostSpecific = true g.HostSpecific = true
addCgroup := true addCgroup := true
if config.Privileged { if config.Privileged {