From 4f401d9cd3da81a1bb43f367cf31def59e241017 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Wed, 3 Jul 2024 19:25:27 +0200 Subject: [PATCH] stacks: add dependency lock to new test case --- internal/stacks/stackruntime/apply_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/stacks/stackruntime/apply_test.go b/internal/stacks/stackruntime/apply_test.go index b159c8070d..77b8b29d08 100644 --- a/internal/stacks/stackruntime/apply_test.go +++ b/internal/stacks/stackruntime/apply_test.go @@ -963,6 +963,14 @@ func TestApplyWithStateManipulation(t *testing.T) { t.Fatal(err) } + lock := depsfile.NewLocks() + lock.SetProvider( + addrs.NewDefaultProvider("testing"), + providerreqs.MustParseVersion("0.0.0"), + providerreqs.MustParseVersionConstraints("=0.0.0"), + providerreqs.PreferredHashes([]providerreqs.Hash{}), + ) + tcs := map[string]struct { state *stackstate.State store *stacks_testing_provider.ResourceStore @@ -1130,6 +1138,7 @@ func TestApplyWithStateManipulation(t *testing.T) { InputValues: inputs, ForcePlanTimestamp: &fakePlanTimestamp, PrevState: tc.state, + DependencyLocks: *lock, } planResp := PlanResponse{ PlannedChanges: planChangeCh, @@ -1175,6 +1184,7 @@ func TestApplyWithStateManipulation(t *testing.T) { Config: cfg, RawPlan: raw, ProviderFactories: providers, + DependencyLocks: *lock, } applyResp := ApplyResponse{ AppliedChanges: applyChangesCh,