mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
7a3070a600
In order to handle special configuration for different drivers we make the Config field a map to string array. This lets us use it for lxc, by using the "lxc" key for those, and we can later extend it easily for other backend-specific options. Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
23 lines
373 B
Go
23 lines
373 B
Go
package runconfig
|
|
|
|
import (
|
|
"github.com/dotcloud/docker/utils"
|
|
"testing"
|
|
)
|
|
|
|
func TestParseLxcConfOpt(t *testing.T) {
|
|
opts := []string{"lxc.utsname=docker", "lxc.utsname = docker "}
|
|
|
|
for _, o := range opts {
|
|
k, v, err := utils.ParseKeyValueOpt(o)
|
|
if err != nil {
|
|
t.FailNow()
|
|
}
|
|
if k != "lxc.utsname" {
|
|
t.Fail()
|
|
}
|
|
if v != "docker" {
|
|
t.Fail()
|
|
}
|
|
}
|
|
}
|