Integration tests for joining namespaces

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
This commit is contained in:
Daniel, Dao Quang Minh
2015-09-14 00:35:22 +00:00
committed by Kenfe-Mickael Laventure
parent 4217b9c121
commit 2d32210620
3 changed files with 260 additions and 4 deletions

View File

@@ -92,13 +92,15 @@ func copyBusybox(dest string) error {
}
func newContainer(config *configs.Config) (libcontainer.Container, error) {
f := factory
return newContainerWithName("testCT", config)
}
func newContainerWithName(name string, config *configs.Config) (libcontainer.Container, error) {
f := factory
if config.Cgroups != nil && config.Cgroups.Parent == "system.slice" {
f = systemdFactory
}
return f.Create("testCT", config)
return f.Create(name, config)
}
// runContainer runs the container with the specific config and arguments