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:
baude 2017-11-02 08:25:06 -05:00
parent 99ca35f185
commit aa19565d8d
3 changed files with 3 additions and 4 deletions

View File

@ -170,7 +170,7 @@ func createCmd(c *cli.Context) error {
if err != nil {
return err
}
options, err := createConfig.GetContainerCreateOptions(c)
options, err := createConfig.GetContainerCreateOptions()
if err != nil {
return errors.Wrapf(err, "unable to parse new container options")
}

View File

@ -63,7 +63,7 @@ func runCmd(c *cli.Context) error {
}
logrus.Debug("imageID is ", imageID)
options, err := createConfig.GetContainerCreateOptions(c)
options, err := createConfig.GetContainerCreateOptions()
if err != nil {
return errors.Wrapf(err, "unable to parse new container options")
}

View File

@ -11,7 +11,6 @@ import (
"github.com/projectatomic/libpod/libpod"
ann "github.com/projectatomic/libpod/pkg/annotations"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"golang.org/x/sys/unix"
)
@ -464,7 +463,7 @@ func (c *createConfig) GetTmpfsMounts() []spec.Mount {
return m
}
func (c *createConfig) GetContainerCreateOptions(cli *cli.Context) ([]libpod.CtrCreateOption, error) {
func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, error) {
var options []libpod.CtrCreateOption
// Uncomment after talking to mheon about unimplemented funcs