terraform: more tests
This commit is contained in:
parent
0ab813fe1c
commit
8552bb18cf
|
@ -283,6 +283,25 @@ func TestContext2Validate_resourceConfig_bad(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestContext2Validate_resourceConfig_good(t *testing.T) {
|
||||
m := testModule(t, "validate-bad-rc")
|
||||
p := testProvider("aws")
|
||||
c := testContext2(t, &ContextOpts{
|
||||
Module: m,
|
||||
Providers: map[string]ResourceProviderFactory{
|
||||
"aws": testProviderFuncFixed(p),
|
||||
},
|
||||
})
|
||||
|
||||
w, e := c.Validate()
|
||||
if len(w) > 0 {
|
||||
t.Fatalf("bad: %#v", w)
|
||||
}
|
||||
if len(e) > 0 {
|
||||
t.Fatalf("bad: %#v", e)
|
||||
}
|
||||
}
|
||||
|
||||
func TestContext2Validate_selfRef(t *testing.T) {
|
||||
p := testProvider("aws")
|
||||
m := testModule(t, "validate-self-ref")
|
||||
|
@ -427,25 +446,6 @@ func TestContextValidate_tainted(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestContextValidate_resourceConfig_good(t *testing.T) {
|
||||
m := testModule(t, "validate-bad-rc")
|
||||
p := testProvider("aws")
|
||||
c := testContext(t, &ContextOpts{
|
||||
Module: m,
|
||||
Providers: map[string]ResourceProviderFactory{
|
||||
"aws": testProviderFuncFixed(p),
|
||||
},
|
||||
})
|
||||
|
||||
w, e := c.Validate()
|
||||
if len(w) > 0 {
|
||||
t.Fatalf("bad: %#v", w)
|
||||
}
|
||||
if len(e) > 0 {
|
||||
t.Fatalf("bad: %#v", e)
|
||||
}
|
||||
}
|
||||
|
||||
func TestContextValidate_resourceNameSymbol(t *testing.T) {
|
||||
p := testProvider("aws")
|
||||
m := testModule(t, "validate-resource-name-symbol")
|
||||
|
|
Loading…
Reference in New Issue