mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
tofu: Context.Refresh now takes a context.Context
This continues our ongoing effort to get a coherent chain of context.Context all the way from "package main" to all of our calls to external components. Context.Refresh is really just a vestigal wrapper around Context.Plan, so this just passes the given context through to Context.Plan which itself currently ignores it. OpenTofu has some historical situational private uses of context.Context to handle the graceful shutdown behaviors. Those use context.Context as a private implementation detail rather than public API, and so this commit leaves them as-is and adds a new "primary context" alongside. Hopefully in future refactoring we can simplify this to use the primary context also as the primary cancellation signal, but that's too risky a change to bundle in with this otherwise-mostly-harmless context plumbing. All of the _test.go file updates here are purely mechanical additions of the extra argument. No test is materially modified by this change, which is intentional to get some assurance that isn't a breaking change. Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
This commit is contained in:
parent
1134f19467
commit
3b79efa834
@ -26,6 +26,15 @@ func (b *Local) opRefresh(
|
||||
|
||||
var diags tfdiags.Diagnostics
|
||||
|
||||
// For the moment we have a bit of a tangled mess of context.Context here, for
|
||||
// historical reasons. Hopefully we'll clean this up one day, but here's the
|
||||
// guide for now:
|
||||
// - ctx is used only for its values, and should be connected to the top-level ctx
|
||||
// from "package main" so that we can obtain telemetry objects, etc from it.
|
||||
// - stopCtx is cancelled to trigger a graceful shutdown.
|
||||
// - cancelCtx is cancelled for a graceless shutdown.
|
||||
ctx := context.WithoutCancel(stopCtx)
|
||||
|
||||
// Check if our state exists if we're performing a refresh operation. We
|
||||
// only do this if we're managing state with this backend.
|
||||
if b.Backend == nil {
|
||||
@ -94,7 +103,7 @@ func (b *Local) opRefresh(
|
||||
go func() {
|
||||
defer panicHandler()
|
||||
defer close(doneCh)
|
||||
newState, refreshDiags = lr.Core.Refresh(lr.Config, lr.InputState, lr.PlanOpts)
|
||||
newState, refreshDiags = lr.Core.Refresh(ctx, lr.Config, lr.InputState, lr.PlanOpts)
|
||||
log.Printf("[INFO] backend/local: refresh calling Refresh")
|
||||
}()
|
||||
|
||||
|
@ -10532,7 +10532,7 @@ func TestContext2Apply_ProviderMeta_refresh_set(t *testing.T) {
|
||||
state, diags := ctx.Apply(context.Background(), plan, m)
|
||||
assertNoErrors(t, diags)
|
||||
|
||||
_, diags = ctx.Refresh(m, state, DefaultPlanOpts)
|
||||
_, diags = ctx.Refresh(context.Background(), m, state, DefaultPlanOpts)
|
||||
assertNoErrors(t, diags)
|
||||
|
||||
if !p.ReadResourceCalled {
|
||||
@ -10610,7 +10610,7 @@ func TestContext2Apply_ProviderMeta_refresh_setNoSchema(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
_, diags = ctx.Refresh(m, state, DefaultPlanOpts)
|
||||
_, diags = ctx.Refresh(context.Background(), m, state, DefaultPlanOpts)
|
||||
if !diags.HasErrors() {
|
||||
t.Fatalf("refresh supposed to error, has no errors")
|
||||
}
|
||||
@ -10682,7 +10682,7 @@ func TestContext2Apply_ProviderMeta_refresh_setInvalid(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
_, diags = ctx.Refresh(m, state, DefaultPlanOpts)
|
||||
_, diags = ctx.Refresh(context.Background(), m, state, DefaultPlanOpts)
|
||||
if !diags.HasErrors() {
|
||||
t.Fatalf("refresh supposed to error, has no errors")
|
||||
}
|
||||
@ -10767,7 +10767,7 @@ func TestContext2Apply_ProviderMeta_refreshdata_set(t *testing.T) {
|
||||
state, diags := ctx.Apply(context.Background(), plan, m)
|
||||
assertNoErrors(t, diags)
|
||||
|
||||
_, diags = ctx.Refresh(m, state, DefaultPlanOpts)
|
||||
_, diags = ctx.Refresh(context.Background(), m, state, DefaultPlanOpts)
|
||||
assertNoErrors(t, diags)
|
||||
|
||||
if !p.ReadDataSourceCalled {
|
||||
@ -10891,7 +10891,7 @@ func TestContext2Apply_ProviderMeta_refreshdata_setNoSchema(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
|
||||
_, diags := ctx.Refresh(m, states.NewState(), DefaultPlanOpts)
|
||||
_, diags := ctx.Refresh(context.Background(), m, states.NewState(), DefaultPlanOpts)
|
||||
if !diags.HasErrors() {
|
||||
t.Fatalf("refresh supposed to error, has no errors")
|
||||
}
|
||||
@ -10945,7 +10945,7 @@ func TestContext2Apply_ProviderMeta_refreshdata_setInvalid(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
|
||||
_, diags := ctx.Refresh(m, states.NewState(), DefaultPlanOpts)
|
||||
_, diags := ctx.Refresh(context.Background(), m, states.NewState(), DefaultPlanOpts)
|
||||
if !diags.HasErrors() {
|
||||
t.Fatalf("refresh supposed to error, has no errors")
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ func TestContext2Input_dataSourceRequiresRefresh(t *testing.T) {
|
||||
// a wrapper around plan anyway, but we're keeping it until we get a
|
||||
// chance to review and check whether it's giving us any additional
|
||||
// test coverage aside from what it's specifically intending to test.
|
||||
if _, diags := ctx.Refresh(m, state, DefaultPlanOpts); diags.HasErrors() {
|
||||
if _, diags := ctx.Refresh(context.Background(), m, state, DefaultPlanOpts); diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
if _, diags := ctx.Plan(context.Background(), m, state, DefaultPlanOpts); diags.HasErrors() {
|
||||
|
@ -22,7 +22,7 @@ import (
|
||||
// automation relying on the "tofu refresh" subcommand. The modern way
|
||||
// to get this effect is to create and then apply a plan in the refresh-only
|
||||
// mode.
|
||||
func (c *Context) Refresh(config *configs.Config, prevRunState *states.State, opts *PlanOpts) (*states.State, tfdiags.Diagnostics) {
|
||||
func (c *Context) Refresh(ctx context.Context, config *configs.Config, prevRunState *states.State, opts *PlanOpts) (*states.State, tfdiags.Diagnostics) {
|
||||
if opts == nil {
|
||||
// This fallback is only here for tests, not for real code.
|
||||
opts = &PlanOpts{
|
||||
@ -34,7 +34,7 @@ func (c *Context) Refresh(config *configs.Config, prevRunState *states.State, op
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] Refresh is really just plan now, so creating a %s plan", opts.Mode)
|
||||
p, diags := c.Plan(context.Background(), config, prevRunState, opts)
|
||||
p, diags := c.Plan(ctx, config, prevRunState, opts)
|
||||
if diags.HasErrors() {
|
||||
return nil, diags
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ func TestContext2Refresh(t *testing.T) {
|
||||
NewState: readState,
|
||||
}
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatal(diags.Err())
|
||||
}
|
||||
@ -137,7 +137,7 @@ func TestContext2Refresh_dynamicAttr(t *testing.T) {
|
||||
schema := p.GetProviderSchemaResponse.ResourceTypes["test_instance"].Block
|
||||
ty := schema.ImpliedType()
|
||||
|
||||
s, diags := ctx.Refresh(m, startingState, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, startingState, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatal(diags.Err())
|
||||
}
|
||||
@ -281,7 +281,7 @@ func TestContext2Refresh_targeted(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
_, diags := ctx.Refresh(m, state, &PlanOpts{
|
||||
_, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{
|
||||
Mode: plans.NormalMode,
|
||||
Targets: []addrs.Targetable{
|
||||
addrs.RootModuleInstance.Resource(
|
||||
@ -368,7 +368,7 @@ func TestContext2Refresh_excluded(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
_, diags := ctx.Refresh(m, state, &PlanOpts{
|
||||
_, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{
|
||||
Mode: plans.NormalMode,
|
||||
Excludes: []addrs.Targetable{
|
||||
addrs.RootModuleInstance.Resource(
|
||||
@ -452,7 +452,7 @@ func TestContext2Refresh_targetedCount(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
_, diags := ctx.Refresh(m, state, &PlanOpts{
|
||||
_, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{
|
||||
Mode: plans.NormalMode,
|
||||
Targets: []addrs.Targetable{
|
||||
addrs.RootModuleInstance.Resource(
|
||||
@ -545,7 +545,7 @@ func TestContext2Refresh_excludedCount(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
_, diags := ctx.Refresh(m, state, &PlanOpts{
|
||||
_, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{
|
||||
Mode: plans.NormalMode,
|
||||
Excludes: []addrs.Targetable{
|
||||
addrs.RootModuleInstance.Resource(
|
||||
@ -633,7 +633,7 @@ func TestContext2Refresh_targetedCountIndex(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
_, diags := ctx.Refresh(m, state, &PlanOpts{
|
||||
_, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{
|
||||
Mode: plans.NormalMode,
|
||||
Targets: []addrs.Targetable{
|
||||
addrs.RootModuleInstance.ResourceInstance(
|
||||
@ -720,7 +720,7 @@ func TestContext2Refresh_excludedCountIndex(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
_, diags := ctx.Refresh(m, state, &PlanOpts{
|
||||
_, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{
|
||||
Mode: plans.NormalMode,
|
||||
Excludes: []addrs.Targetable{
|
||||
addrs.RootModuleInstance.ResourceInstance(
|
||||
@ -769,7 +769,7 @@ func TestContext2Refresh_moduleComputedVar(t *testing.T) {
|
||||
|
||||
// This was failing (see GH-2188) at some point, so this test just
|
||||
// verifies that the failure goes away.
|
||||
if _, diags := ctx.Refresh(m, states.NewState(), &PlanOpts{Mode: plans.NormalMode}); diags.HasErrors() {
|
||||
if _, diags := ctx.Refresh(context.Background(), m, states.NewState(), &PlanOpts{Mode: plans.NormalMode}); diags.HasErrors() {
|
||||
t.Fatalf("refresh errs: %s", diags.Err())
|
||||
}
|
||||
}
|
||||
@ -792,7 +792,7 @@ func TestContext2Refresh_delete(t *testing.T) {
|
||||
NewState: cty.NullVal(p.GetProviderSchemaResponse.ResourceTypes["aws_instance"].Block.ImpliedType()),
|
||||
}
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
@ -818,7 +818,7 @@ func TestContext2Refresh_ignoreUncreated(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
|
||||
_, diags := ctx.Refresh(m, states.NewState(), &PlanOpts{Mode: plans.NormalMode})
|
||||
_, diags := ctx.Refresh(context.Background(), m, states.NewState(), &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
@ -843,7 +843,7 @@ func TestContext2Refresh_hook(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
if _, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode}); diags.HasErrors() {
|
||||
if _, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode}); diags.HasErrors() {
|
||||
t.Fatalf("refresh errs: %s", diags.Err())
|
||||
}
|
||||
if !h.PreRefreshCalled {
|
||||
@ -888,7 +888,7 @@ func TestContext2Refresh_modules(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
@ -928,7 +928,7 @@ func TestContext2Refresh_moduleInputComputedOutput(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
if _, diags := ctx.Refresh(m, states.NewState(), &PlanOpts{Mode: plans.NormalMode}); diags.HasErrors() {
|
||||
if _, diags := ctx.Refresh(context.Background(), m, states.NewState(), &PlanOpts{Mode: plans.NormalMode}); diags.HasErrors() {
|
||||
t.Fatalf("refresh errs: %s", diags.Err())
|
||||
}
|
||||
}
|
||||
@ -942,7 +942,7 @@ func TestContext2Refresh_moduleVarModule(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
if _, diags := ctx.Refresh(m, states.NewState(), &PlanOpts{Mode: plans.NormalMode}); diags.HasErrors() {
|
||||
if _, diags := ctx.Refresh(context.Background(), m, states.NewState(), &PlanOpts{Mode: plans.NormalMode}); diags.HasErrors() {
|
||||
t.Fatalf("refresh errs: %s", diags.Err())
|
||||
}
|
||||
}
|
||||
@ -963,7 +963,7 @@ func TestContext2Refresh_noState(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
|
||||
if _, diags := ctx.Refresh(m, states.NewState(), &PlanOpts{Mode: plans.NormalMode}); diags.HasErrors() {
|
||||
if _, diags := ctx.Refresh(context.Background(), m, states.NewState(), &PlanOpts{Mode: plans.NormalMode}); diags.HasErrors() {
|
||||
t.Fatalf("refresh errs: %s", diags.Err())
|
||||
}
|
||||
}
|
||||
@ -1003,7 +1003,7 @@ func TestContext2Refresh_output(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
@ -1051,7 +1051,7 @@ func TestContext2Refresh_outputPartial(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
@ -1091,7 +1091,7 @@ func TestContext2Refresh_stateBasic(t *testing.T) {
|
||||
NewState: readStateVal,
|
||||
}
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
@ -1147,7 +1147,7 @@ func TestContext2Refresh_dataCount(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
s, diags := ctx.Refresh(m, states.NewState(), &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, states.NewState(), &PlanOpts{Mode: plans.NormalMode})
|
||||
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
@ -1193,7 +1193,7 @@ func TestContext2Refresh_dataState(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
@ -1256,7 +1256,7 @@ func TestContext2Refresh_dataStateRefData(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
@ -1291,7 +1291,7 @@ func TestContext2Refresh_tainted(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
@ -1322,7 +1322,7 @@ func TestContext2Refresh_unknownProvider(t *testing.T) {
|
||||
})
|
||||
assertNoDiagnostics(t, diags)
|
||||
|
||||
_, diags = c.Refresh(m, states.NewState(), &PlanOpts{Mode: plans.NormalMode})
|
||||
_, diags = c.Refresh(context.Background(), m, states.NewState(), &PlanOpts{Mode: plans.NormalMode})
|
||||
if !diags.HasErrors() {
|
||||
t.Fatal("successfully refreshed; want error")
|
||||
}
|
||||
@ -1381,7 +1381,7 @@ func TestContext2Refresh_vars(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("refresh errors: %s", diags.Err())
|
||||
}
|
||||
@ -1461,7 +1461,7 @@ func TestContext2Refresh_orphanModule(t *testing.T) {
|
||||
})
|
||||
|
||||
testCheckDeadlock(t, func() {
|
||||
_, err := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
_, err := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err.Err())
|
||||
}
|
||||
@ -1526,7 +1526,7 @@ aws_instance.bar:
|
||||
ID = foo
|
||||
provider = provider["registry.opentofu.org/hashicorp/aws"].foo`)
|
||||
|
||||
s, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
s, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatal(diags.Err())
|
||||
}
|
||||
@ -1589,7 +1589,7 @@ func TestContext2Refresh_schemaUpgradeFlatmap(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
state, diags := ctx.Refresh(m, s, &PlanOpts{Mode: plans.NormalMode})
|
||||
state, diags := ctx.Refresh(context.Background(), m, s, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatal(diags.Err())
|
||||
}
|
||||
@ -1672,7 +1672,7 @@ func TestContext2Refresh_schemaUpgradeJSON(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
state, diags := ctx.Refresh(m, s, &PlanOpts{Mode: plans.NormalMode})
|
||||
state, diags := ctx.Refresh(context.Background(), m, s, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatal(diags.Err())
|
||||
}
|
||||
@ -1728,7 +1728,7 @@ data "aws_data_source" "foo" {
|
||||
},
|
||||
})
|
||||
|
||||
_, diags := ctx.Refresh(m, states.NewState(), &PlanOpts{Mode: plans.NormalMode})
|
||||
_, diags := ctx.Refresh(context.Background(), m, states.NewState(), &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
// Should get this error:
|
||||
// Unsupported attribute: This object does not have an attribute named "missing"
|
||||
@ -1776,7 +1776,7 @@ func TestContext2Refresh_dataResourceDependsOn(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
_, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
_, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("unexpected errors: %s", diags.Err())
|
||||
}
|
||||
@ -1821,7 +1821,7 @@ resource "aws_instance" "bar" {
|
||||
},
|
||||
})
|
||||
|
||||
state, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
state, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("plan errors: %s", diags.Err())
|
||||
}
|
||||
@ -1868,7 +1868,7 @@ func TestContext2Refresh_dataSourceOrphan(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
_, diags := ctx.Refresh(m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
_, diags := ctx.Refresh(context.Background(), m, state, &PlanOpts{Mode: plans.NormalMode})
|
||||
if diags.HasErrors() {
|
||||
t.Fatal(diags.Err())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user