Skip to content

Commit

Permalink
Merge pull request #169 from pact-foundation/feat/do_not_retry_in_dry…
Browse files Browse the repository at this point in the history
…_run_mode

feat(can-i-deploy): skip --retry-while-unknown if --dry-run true
  • Loading branch information
YOU54F authored Aug 12, 2024
2 parents 7d71aeb + cbbcc0a commit 9e26b36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/pact_broker/client/can_i_deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def fetch_matrix

def fetch_matrix_with_retries
matrix = fetch_matrix
if retry_while_unknown?
if retry_while_unknown? && !dry_run_or_false
check_if_retry_while_unknown_supported(matrix)
if matrix.any_unknown?
results = matrix.unknown_count == 1 ? "result" : "results"
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/pact_broker/client/can_i_deploy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ module Client
expect(subject.success).to be true
end

it "returns a failure message" do
it "returns a success message" do
expect(subject.message).to include "[dry-run]"
expect(subject.message).to match /does not provide a count/
expect(subject.message).to match /Dry run enabled - ignoring any failures/
end
end
end
Expand Down

0 comments on commit 9e26b36

Please sign in to comment.