summaryrefslogtreecommitdiff
path: root/libvirt/utils_domain_def_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libvirt/utils_domain_def_test.go')
-rw-r--r--libvirt/utils_domain_def_test.go21
1 files changed, 8 insertions, 13 deletions
diff --git a/libvirt/utils_domain_def_test.go b/libvirt/utils_domain_def_test.go
index 746c095b..3b3061c5 100644
--- a/libvirt/utils_domain_def_test.go
+++ b/libvirt/utils_domain_def_test.go
@@ -12,8 +12,14 @@ func init() {
}
func TestSplitKernelCmdLine(t *testing.T) {
- e := []map[string]string{{"foo": "bar"}, {"foo": "bar", "key": "val"}, {"_": "nosplash rw"}}
- r, err := splitKernelCmdLine("foo=bar foo=bar key=val nosplash rw")
+ e := []map[string]string{
+ {"foo": "bar"},
+ {
+ "foo": "bar",
+ "key": "val",
+ "root": "UUID=aa52d618-a2c4-4aad-aeb7-68d9e3a2c91d"},
+ {"_": "nosplash rw"}}
+ r, err := splitKernelCmdLine("foo=bar foo=bar key=val root=UUID=aa52d618-a2c4-4aad-aeb7-68d9e3a2c91d nosplash rw")
if !reflect.DeepEqual(r, e) {
t.Fatalf("got='%s' expected='%s'", spew.Sdump(r), spew.Sdump(e))
}
@@ -22,17 +28,6 @@ func TestSplitKernelCmdLine(t *testing.T) {
}
}
-func TestSplitKernelInvalidCmdLine(t *testing.T) {
- v := "foo=barfoo=bar"
- r, err := splitKernelCmdLine(v)
- if r != nil {
- t.Fatalf("got='%s' expected='%s'", spew.Sdump(r), err)
- }
- if err == nil {
- t.Errorf("Expected error for parsing '%s'", v)
- }
-}
-
func TestSplitKernelEmptyCmdLine(t *testing.T) {
var e []map[string]string
r, err := splitKernelCmdLine("")