Skip to content

Commit

Permalink
fixup! feat: when using ordergroup, abort plan/apply if any fail
Browse files Browse the repository at this point in the history
  • Loading branch information
oysteingraendsen committed Apr 12, 2023
1 parent d2b154a commit bc1bf17
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions server/events/apply_command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

"github.com/google/go-github/v51/github"
. "github.com/petergtz/pegomock"
pegomock "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server/core/db"
"github.com/runatlantis/atlantis/server/core/locking"
"github.com/runatlantis/atlantis/server/events"
Expand Down Expand Up @@ -225,7 +224,7 @@ func TestApplyCommandRunner_ExecutionOrder(t *testing.T) {
Description string
ProjectContexts []command.ProjectContext
ProjectResults []command.ProjectResult
RunnerInvokeMatch []*pegomock.EqMatcher
RunnerInvokeMatch []*EqMatcher
ExpComment string
}{
{
Expand All @@ -252,9 +251,9 @@ func TestApplyCommandRunner_ExecutionOrder(t *testing.T) {
Error: errors.New("Shabang!"),
},
},
RunnerInvokeMatch: []*pegomock.EqMatcher{
pegomock.Once(),
pegomock.Once(),
RunnerInvokeMatch: []*EqMatcher{
Once(),
Once(),
},
ExpComment: "Ran Apply for 2 projects:\n\n" +
"1. dir: `` workspace: ``\n1. dir: `` workspace: ``\n\n### 1. dir: `` workspace: ``\n```diff\nGreat success!\n```\n\n---\n### " +
Expand Down Expand Up @@ -284,9 +283,9 @@ func TestApplyCommandRunner_ExecutionOrder(t *testing.T) {
ApplySuccess: "Great success!",
},
},
RunnerInvokeMatch: []*pegomock.EqMatcher{
pegomock.Once(),
pegomock.Never(),
RunnerInvokeMatch: []*EqMatcher{
Once(),
Never(),
},
ExpComment: "Ran Apply for dir: `` workspace: ``\n\n**Apply Error**\n```\nShabang!\n```",
},
Expand Down Expand Up @@ -329,11 +328,11 @@ func TestApplyCommandRunner_ExecutionOrder(t *testing.T) {
ApplySuccess: "Great success!",
},
},
RunnerInvokeMatch: []*pegomock.EqMatcher{
pegomock.Once(),
pegomock.Once(),
pegomock.Never(),
pegomock.Never(),
RunnerInvokeMatch: []*EqMatcher{
Once(),
Once(),
Never(),
Never(),
},
ExpComment: "Ran Apply for 2 projects:\n\n" +
"1. dir: `` workspace: ``\n1. dir: `` workspace: ``\n\n### 1. dir: `` workspace: ``\n```diff\nGreat success!\n```\n\n---\n### " +
Expand Down Expand Up @@ -378,11 +377,11 @@ func TestApplyCommandRunner_ExecutionOrder(t *testing.T) {
ApplySuccess: "Great success!",
},
},
RunnerInvokeMatch: []*pegomock.EqMatcher{
pegomock.Once(),
pegomock.Once(),
pegomock.Once(),
pegomock.Once(),
RunnerInvokeMatch: []*EqMatcher{
Once(),
Once(),
Once(),
Once(),
},
ExpComment: "Ran Apply for 4 projects:\n\n" +
"1. dir: `` workspace: ``\n1. dir: `` workspace: ``\n1. dir: `` workspace: ``\n1. dir: `` workspace: ``\n\n### 1. dir: `` workspace: ``\n```diff\nGreat success!\n```\n\n---\n### " +
Expand Down Expand Up @@ -412,9 +411,9 @@ func TestApplyCommandRunner_ExecutionOrder(t *testing.T) {
ApplySuccess: "Great success!",
},
},
RunnerInvokeMatch: []*pegomock.EqMatcher{
pegomock.Once(),
pegomock.Once(),
RunnerInvokeMatch: []*EqMatcher{
Once(),
Once(),
},
ExpComment: "Ran Apply for 2 projects:\n\n" +
"1. dir: `` workspace: ``\n1. dir: `` workspace: ``\n\n### 1. dir: `` workspace: ``\n**Apply Error**\n```\nShabang!\n```\n\n---\n### " +
Expand Down

0 comments on commit bc1bf17

Please sign in to comment.