mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-15 19:22:46 -06:00
core: use testApplyFn in TestContext2Apply_countDecreaseToOneCorrupted
Without testApplyFn, the test can't perform the actions it's trying to perform.
This commit is contained in:
parent
a90d6cc599
commit
dea74f9048
@ -2278,6 +2278,7 @@ func TestContext2Apply_countTainted(t *testing.T) {
|
|||||||
m := testModule(t, "apply-count-tainted")
|
m := testModule(t, "apply-count-tainted")
|
||||||
p := testProvider("aws")
|
p := testProvider("aws")
|
||||||
p.DiffFn = testDiffFn
|
p.DiffFn = testDiffFn
|
||||||
|
p.ApplyFn = testApplyFn
|
||||||
s := mustShimLegacyState(&State{
|
s := mustShimLegacyState(&State{
|
||||||
Modules: []*ModuleState{
|
Modules: []*ModuleState{
|
||||||
&ModuleState{
|
&ModuleState{
|
||||||
@ -2317,10 +2318,10 @@ func TestContext2Apply_countTainted(t *testing.T) {
|
|||||||
t.Fatalf("diags: %s", diags.Err())
|
t.Fatalf("diags: %s", diags.Err())
|
||||||
}
|
}
|
||||||
|
|
||||||
actual := strings.TrimSpace(state.String())
|
got := strings.TrimSpace(state.String())
|
||||||
expected := strings.TrimSpace(testTerraformApplyCountTaintedStr)
|
want := strings.TrimSpace(testTerraformApplyCountTaintedStr)
|
||||||
if actual != expected {
|
if got != want {
|
||||||
t.Fatalf("wrong result\n\ngot:\n%s\n\nwant:\n%s", actual, expected)
|
t.Fatalf("wrong result\n\ngot:\n%s\n\nwant:\n%s", got, want)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user