Skip to content

Commit

Permalink
Merge pull request #124 from pact-foundation/feat/pending-pacts
Browse files Browse the repository at this point in the history
feat(pending): support initial pending pacts implementation
  • Loading branch information
mefellows authored Jan 21, 2020
2 parents a88e2e2 + ad9fe09 commit ad09bfa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dsl/pact.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,16 @@ func (p *Pact) VerifyProvider(t *testing.T, request types.VerifyRequest) (types.
for _, example := range res.Examples {
t.Run(example.Description, func(st *testing.T) {
st.Log(example.FullDescription)

if example.Status != "passed" {
t.Errorf("%s\n%s\n", example.FullDescription, example.Exception.Message)
if strings.Contains(example.FullDescription, "[PENDING]") {
t.Logf("NOTICE: This interaction is in a pending state because it has not yet been successfully verified by %s. If this verification fails, it will not cause the overall build to fail. Read more at https://pact.io/pending", p.Provider)
t.Logf("%s\n%s\n", example.FullDescription, example.Exception.Message)
} else {
t.Errorf("%s\n%s\n", example.FullDescription, example.Exception.Message)
}
}

})
}

Expand Down

0 comments on commit ad09bfa

Please sign in to comment.