|
|
|
|
@ -267,7 +267,7 @@ func TestProvisionerPrepare_jsonNested(t *testing.T) {
|
|
|
|
|
config := testConfig()
|
|
|
|
|
config["json"] = map[string]interface{}{
|
|
|
|
|
"foo": map[interface{}]interface{}{
|
|
|
|
|
"bar": "baz",
|
|
|
|
|
"bar": []uint8("baz"),
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"bar": []interface{}{
|
|
|
|
|
@ -281,6 +281,7 @@ func TestProvisionerPrepare_jsonNested(t *testing.T) {
|
|
|
|
|
"bFalse": false,
|
|
|
|
|
"bTrue": true,
|
|
|
|
|
"bNil": nil,
|
|
|
|
|
"bStr": []uint8("bar"),
|
|
|
|
|
|
|
|
|
|
"bInt": 1,
|
|
|
|
|
"bFloat": 4.5,
|
|
|
|
|
@ -291,4 +292,12 @@ func TestProvisionerPrepare_jsonNested(t *testing.T) {
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("err: %s", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fooMap := p.config.Json["foo"].(map[string]interface{})
|
|
|
|
|
if fooMap["bar"] != "baz" {
|
|
|
|
|
t.Fatalf("nope: %#v", fooMap["bar"])
|
|
|
|
|
}
|
|
|
|
|
if p.config.Json["bStr"] != "bar" {
|
|
|
|
|
t.Fatalf("nope: %#v", fooMap["bar"])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|