Skip to content

Commit

Permalink
feat(pending): support initial pending pacts implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Fellows committed Jan 21, 2020
1 parent a88e2e2 commit ad9fe09
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 ad9fe09

Please sign in to comment.