mirror of
https://github.com/rancher/os.git
synced 2025-09-02 07:15:41 +00:00
Colons can be parsed without quotes
This commit is contained in:
@@ -122,6 +122,12 @@ func TestParseCmdline(t *testing.T) {
|
||||
},
|
||||
}, parseCmdline("rancher.key=a\nb"))
|
||||
|
||||
assert.Equal(map[interface{}]interface{}{
|
||||
"rancher": map[interface{}]interface{}{
|
||||
"key": "a:b",
|
||||
},
|
||||
}, parseCmdline("rancher.key=a:b"))
|
||||
|
||||
assert.Equal(map[interface{}]interface{}{
|
||||
"rancher": map[interface{}]interface{}{
|
||||
"key": int64(5),
|
||||
@@ -145,6 +151,12 @@ func TestParseCmdline(t *testing.T) {
|
||||
"strArray": []interface{}{"url:http://192.168.1.100/cloud-config"},
|
||||
},
|
||||
}, parseCmdline("rancher.strArray=[\"url:http://192.168.1.100/cloud-config\"]"))
|
||||
|
||||
assert.Equal(map[interface{}]interface{}{
|
||||
"rancher": map[interface{}]interface{}{
|
||||
"strArray": []interface{}{"url:http://192.168.1.100/cloud-config"},
|
||||
},
|
||||
}, parseCmdline("rancher.strArray=[url:http://192.168.1.100/cloud-config]"))
|
||||
}
|
||||
|
||||
func TestGet(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user