config: RawConfig.Config returns raw if no interpolate
This commit is contained in:
parent
8c50aa6382
commit
69841c22e6
|
@ -39,6 +39,7 @@ func NewRawConfig(raw map[string]interface{}) (*RawConfig, error) {
|
|||
return &RawConfig{
|
||||
Raw: raw,
|
||||
Variables: walker.Variables,
|
||||
config: raw,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,11 @@ func TestRawConfig(t *testing.T) {
|
|||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
// Before interpolate, Config() should be the raw
|
||||
if !reflect.DeepEqual(rc.Config(), raw) {
|
||||
t.Fatalf("bad: %#v", rc.Config())
|
||||
}
|
||||
|
||||
vars := map[string]string{"var.bar": "baz"}
|
||||
if err := rc.Interpolate(vars); err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
|
|
Loading…
Reference in New Issue