core: remove TestContext2Apply_outputInvalid
This was testing that returning a number as an output would be reported as an error, but that is intentionally allowed now.
This commit is contained in:
parent
b4d7882e2f
commit
38f37af7e9
|
@ -7105,29 +7105,6 @@ func TestContext2Apply_outputBasic(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestContext2Apply_outputInvalid(t *testing.T) {
|
|
||||||
m := testModule(t, "apply-output-invalid")
|
|
||||||
p := testProvider("aws")
|
|
||||||
p.ApplyFn = testApplyFn
|
|
||||||
p.DiffFn = testDiffFn
|
|
||||||
ctx := testContext2(t, &ContextOpts{
|
|
||||||
Config: m,
|
|
||||||
ProviderResolver: ResourceProviderResolverFixed(
|
|
||||||
map[string]ResourceProviderFactory{
|
|
||||||
"aws": testProviderFuncFixed(p),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
})
|
|
||||||
|
|
||||||
_, diags := ctx.Plan()
|
|
||||||
if !diags.HasErrors() {
|
|
||||||
t.Fatal("succeeded; want error")
|
|
||||||
}
|
|
||||||
if errStr := diags.Err().Error(); !strings.Contains(errStr, "is not a valid type") {
|
|
||||||
t.Fatalf("wrong error: %s", errStr)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestContext2Apply_outputAdd(t *testing.T) {
|
func TestContext2Apply_outputAdd(t *testing.T) {
|
||||||
m1 := testModule(t, "apply-output-add-before")
|
m1 := testModule(t, "apply-output-add-before")
|
||||||
p1 := testProvider("aws")
|
p1 := testProvider("aws")
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
resource "aws_instance" "foo" {
|
|
||||||
num = "2"
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_instance" "bar" {
|
|
||||||
foo = "bar"
|
|
||||||
count = 3
|
|
||||||
}
|
|
||||||
|
|
||||||
output "foo_num" {
|
|
||||||
value = 42
|
|
||||||
}
|
|
Loading…
Reference in New Issue