Skip to content

Commit

Permalink
address failing autoplan test with automerge
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudomorph committed Jul 10, 2023
1 parent fb2df20 commit 06ffe01
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/events/command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -695,16 +695,17 @@ func TestRunAutoplanCommandWithError_DeletePlans(t *testing.T) {
Ok(t, err)
dbUpdater.Backend = boltDB
applyCommandRunner.Backend = boltDB
autoMerger.GlobalAutomerge = true
defer func() { autoMerger.GlobalAutomerge = false }()

When(projectCommandBuilder.BuildAutoplanCommands(Any[*command.Context]())).
ThenReturn([]command.ProjectContext{
{
CommandName: command.Plan,
CommandName: command.Plan,
AutomergeEnabled: true, // Setting this manually, since this tests bypasses automerge param reconciliation logic and otherwise defaults to false.
},
{
CommandName: command.Plan,
CommandName: command.Plan,
AutomergeEnabled: true, // Setting this manually, since this tests bypasses automerge param reconciliation logic and otherwise defaults to false.
},
}, nil)
callCount := 0
Expand Down

0 comments on commit 06ffe01

Please sign in to comment.