github.com/microsoft/docker@v1.5.0-rc2/daemon/utils_test.go (about) 1 package daemon 2 3 import ( 4 "testing" 5 6 "github.com/docker/docker/runconfig" 7 "github.com/docker/docker/utils" 8 ) 9 10 func TestMergeLxcConfig(t *testing.T) { 11 hostConfig := &runconfig.HostConfig{ 12 LxcConf: []utils.KeyValuePair{ 13 {Key: "lxc.cgroups.cpuset", Value: "1,2"}, 14 }, 15 } 16 17 out, err := mergeLxcConfIntoOptions(hostConfig) 18 if err != nil { 19 t.Fatalf("Failed to merge Lxc Config: %s", err) 20 } 21 22 cpuset := out[0] 23 if expected := "cgroups.cpuset=1,2"; cpuset != expected { 24 t.Fatalf("expected %s got %s", expected, cpuset) 25 } 26 }