Fix conmon and runc paths for kpod tests

Tests for kpod create and run were failing because the conmon
binary was being hardcoded.  We added a  --conmon global optioni
for kpod so we could pass in the conmon path from the helpers
file during tests

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude 2017-10-31 15:43:12 -05:00
parent c6cc205b78
commit b85fe5ab90
6 changed files with 11 additions and 12 deletions

View file

@ -49,7 +49,7 @@ func getRuntime(c *cli.Context) (*libpod.Runtime, error) {
options.GraphDriverName = config.Storage
options.GraphDriverOptions = config.StorageOptions
return libpod.NewRuntime(libpod.WithStorageConfig(options))
return libpod.NewRuntime(libpod.WithStorageConfig(options), libpod.WithConmonPath(config.Conmon), libpod.WithOCIRuntime(config.Runtime))
}
func shutdownStores() {
@ -82,7 +82,9 @@ func getConfig(c *cli.Context) (*libkpod.Config, error) {
if c.GlobalIsSet("runroot") {
config.RunRoot = c.GlobalString("runroot")
}
if c.GlobalIsSet("conmon") {
config.Conmon = c.GlobalString("conmon")
}
if c.GlobalIsSet("storage-driver") {
config.Storage = c.GlobalString("storage-driver")
}