Skip to content

Commit

Permalink
fix: misleading error message in certain verification scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Oct 19, 2020
1 parent 57ee02d commit 502f7f5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dsl/pact.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,10 @@ func (p *Pact) VerifyProvider(t *testing.T, request types.VerifyRequest) ([]type
res, err := p.VerifyProviderRaw(request)

if len(res) == 0 {
message := "No pacts found to verify"
var message = "no pacts found to verify"
if err != nil {
message = "error verifying the provider: see returned error for detail"
}

if len(request.Tags) > 0 {
message = fmt.Sprintf("%s. Check the tags provided (%s) for your broker (%s) are correct", message, strings.Join(request.Tags, ","), request.BrokerURL)
Expand Down

0 comments on commit 502f7f5

Please sign in to comment.