Skip to content

Commit

Permalink
feat(can-i-deploy): skip --retry-while-unknown if --dry-run true
Browse files Browse the repository at this point in the history
fixes #149
  • Loading branch information
YOU54F committed Aug 7, 2024
1 parent 7d71aeb commit cbbcc0a
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 cbbcc0a

Please sign in to comment.