|
|
@ -183,6 +183,7 @@ func TestDefaultResolver(t *testing.T) { |
|
|
|
"enable": "${ENABLE:false}", |
|
|
|
"enable": "${ENABLE:false}", |
|
|
|
"rate": "${RATE}", |
|
|
|
"rate": "${RATE}", |
|
|
|
"empty": "${EMPTY:foobar}", |
|
|
|
"empty": "${EMPTY:foobar}", |
|
|
|
|
|
|
|
"url": "${URL:http://example.com}", |
|
|
|
"array": []interface{}{ |
|
|
|
"array": []interface{}{ |
|
|
|
"${PORT}", |
|
|
|
"${PORT}", |
|
|
|
map[string]interface{}{"foobar": "${NOTEXIST:8081}"}, |
|
|
|
map[string]interface{}{"foobar": "${NOTEXIST:8081}"}, |
|
|
@ -237,6 +238,11 @@ func TestDefaultResolver(t *testing.T) { |
|
|
|
path: "foo.bar.empty", |
|
|
|
path: "foo.bar.empty", |
|
|
|
expect: "", |
|
|
|
expect: "", |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "test url with default", |
|
|
|
|
|
|
|
path: "foo.bar.url", |
|
|
|
|
|
|
|
expect: "http://example.com", |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: "test array", |
|
|
|
name: "test array", |
|
|
|
path: "foo.bar.array", |
|
|
|
path: "foo.bar.array", |
|
|
|