mirror of https://github.com/containers/podman.git
spec.go: Remove cli context as func arg
Remove cli context as a func arg to make unit tests easier. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
parent
99ca35f185
commit
aa19565d8d
|
|
@ -170,7 +170,7 @@ func createCmd(c *cli.Context) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
options, err := createConfig.GetContainerCreateOptions(c)
|
options, err := createConfig.GetContainerCreateOptions()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "unable to parse new container options")
|
return errors.Wrapf(err, "unable to parse new container options")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ func runCmd(c *cli.Context) error {
|
||||||
}
|
}
|
||||||
logrus.Debug("imageID is ", imageID)
|
logrus.Debug("imageID is ", imageID)
|
||||||
|
|
||||||
options, err := createConfig.GetContainerCreateOptions(c)
|
options, err := createConfig.GetContainerCreateOptions()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "unable to parse new container options")
|
return errors.Wrapf(err, "unable to parse new container options")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import (
|
||||||
"github.com/projectatomic/libpod/libpod"
|
"github.com/projectatomic/libpod/libpod"
|
||||||
ann "github.com/projectatomic/libpod/pkg/annotations"
|
ann "github.com/projectatomic/libpod/pkg/annotations"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/urfave/cli"
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -464,7 +463,7 @@ func (c *createConfig) GetTmpfsMounts() []spec.Mount {
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *createConfig) GetContainerCreateOptions(cli *cli.Context) ([]libpod.CtrCreateOption, error) {
|
func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, error) {
|
||||||
var options []libpod.CtrCreateOption
|
var options []libpod.CtrCreateOption
|
||||||
|
|
||||||
// Uncomment after talking to mheon about unimplemented funcs
|
// Uncomment after talking to mheon about unimplemented funcs
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue