mirror of
https://github.com/hashicorp/terraform.git
synced 2026-02-03 20:50:59 -05:00
test: Update remaining tests to include a value for Workspace in mocked plans
This commit is contained in:
parent
c2244f7507
commit
4aba1684f3
4 changed files with 33 additions and 22 deletions
|
|
@ -161,8 +161,9 @@ func TestLocalRun_stalePlan(t *testing.T) {
|
|||
UIMode: plans.NormalMode,
|
||||
Changes: plans.NewChangesSrc(),
|
||||
Backend: &plans.Backend{
|
||||
Type: "local",
|
||||
Config: backendConfigRaw,
|
||||
Type: "local",
|
||||
Config: backendConfigRaw,
|
||||
Workspace: "default",
|
||||
},
|
||||
PrevRunState: states.NewState(),
|
||||
PriorState: states.NewState(),
|
||||
|
|
|
|||
|
|
@ -207,8 +207,9 @@ func TestLocal_planOutputsChanged(t *testing.T) {
|
|||
}
|
||||
op.PlanOutBackend = &plans.Backend{
|
||||
// Just a placeholder so that we can generate a valid plan file.
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Workspace: "default",
|
||||
}
|
||||
run, err := b.Operation(context.Background(), op)
|
||||
if err != nil {
|
||||
|
|
@ -263,8 +264,9 @@ func TestLocal_planModuleOutputsChanged(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
op.PlanOutBackend = &plans.Backend{
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Workspace: "default",
|
||||
}
|
||||
run, err := b.Operation(context.Background(), op)
|
||||
if err != nil {
|
||||
|
|
@ -305,8 +307,9 @@ func TestLocal_planTainted(t *testing.T) {
|
|||
}
|
||||
op.PlanOutBackend = &plans.Backend{
|
||||
// Just a placeholder so that we can generate a valid plan file.
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Workspace: "default",
|
||||
}
|
||||
run, err := b.Operation(context.Background(), op)
|
||||
if err != nil {
|
||||
|
|
@ -384,8 +387,9 @@ func TestLocal_planDeposedOnly(t *testing.T) {
|
|||
}
|
||||
op.PlanOutBackend = &plans.Backend{
|
||||
// Just a placeholder so that we can generate a valid plan file.
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Workspace: "default",
|
||||
}
|
||||
run, err := b.Operation(context.Background(), op)
|
||||
if err != nil {
|
||||
|
|
@ -475,8 +479,9 @@ func TestLocal_planTainted_createBeforeDestroy(t *testing.T) {
|
|||
}
|
||||
op.PlanOutBackend = &plans.Backend{
|
||||
// Just a placeholder so that we can generate a valid plan file.
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Workspace: "default",
|
||||
}
|
||||
run, err := b.Operation(context.Background(), op)
|
||||
if err != nil {
|
||||
|
|
@ -566,8 +571,9 @@ func TestLocal_planDestroy(t *testing.T) {
|
|||
}
|
||||
op.PlanOutBackend = &plans.Backend{
|
||||
// Just a placeholder so that we can generate a valid plan file.
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Workspace: "default",
|
||||
}
|
||||
|
||||
run, err := b.Operation(context.Background(), op)
|
||||
|
|
@ -618,8 +624,9 @@ func TestLocal_planDestroy_withDataSources(t *testing.T) {
|
|||
}
|
||||
op.PlanOutBackend = &plans.Backend{
|
||||
// Just a placeholder so that we can generate a valid plan file.
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Workspace: "default",
|
||||
}
|
||||
|
||||
run, err := b.Operation(context.Background(), op)
|
||||
|
|
@ -690,8 +697,9 @@ func TestLocal_planOutPathNoChange(t *testing.T) {
|
|||
}
|
||||
op.PlanOutBackend = &plans.Backend{
|
||||
// Just a placeholder so that we can generate a valid plan file.
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Type: "local",
|
||||
Config: cfgRaw,
|
||||
Workspace: "default",
|
||||
}
|
||||
op.PlanRefresh = true
|
||||
|
||||
|
|
|
|||
|
|
@ -1087,8 +1087,9 @@ func TestApply_plan_remoteState(t *testing.T) {
|
|||
}
|
||||
planPath := testPlanFile(t, snap, state, &plans.Plan{
|
||||
Backend: &plans.Backend{
|
||||
Type: "http",
|
||||
Config: backendConfigRaw,
|
||||
Type: "http",
|
||||
Config: backendConfigRaw,
|
||||
Workspace: "default",
|
||||
},
|
||||
Changes: plans.NewChangesSrc(),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -329,8 +329,9 @@ func TestGraph_applyPhaseSavedPlan(t *testing.T) {
|
|||
// Doesn't actually matter since we aren't going to activate the backend
|
||||
// for this command anyway, but we need something here for the plan
|
||||
// file writer to succeed.
|
||||
Type: "placeholder",
|
||||
Config: emptyObj,
|
||||
Type: "placeholder",
|
||||
Config: emptyObj,
|
||||
Workspace: "default",
|
||||
}
|
||||
_, configSnap := testModuleWithSnapshot(t, "graph")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue