Skip to content

Commit

Permalink
feat: add support for wip pacts
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Apr 9, 2020
1 parent b17d7b9 commit 50b56b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion install/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Installer struct {

const (
mockServiceRange = ">= 3.5.0, < 4.0.0"
verifierRange = ">= 1.27.1, < 2.0.0"
verifierRange = ">= 1.30.0, < 2.0.0"
brokerRange = ">= 1.22.3"
)

Expand Down
8 changes: 8 additions & 0 deletions types/verify_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"log"
"time"

"github.com/pact-foundation/pact-go/proxy"
)
Expand Down Expand Up @@ -101,6 +102,9 @@ type VerifyRequest struct {
// Allow pending pacts to be included in verification (see pact.io/pending)
EnablePending bool

// Pull in new WIP pacts from _any_ tag (see pact.io/wip)
IncludeWIPPactsSince *time.Time

// Verbose increases verbosity of output
// Deprecated
Verbose bool
Expand Down Expand Up @@ -209,5 +213,9 @@ func (v *VerifyRequest) Validate() error {
v.Args = append(v.Args, "--enable-pending")
}

if v.IncludeWIPPactsSince != nil {
v.Args = append(v.Args, "--include-wip-pacts-since", v.IncludeWIPPactsSince.Format(time.RFC3339))
}

return nil
}

0 comments on commit 50b56b7

Please sign in to comment.