From 50b56b73ae49de46e53e1577c5f66b2c6f9fecc2 Mon Sep 17 00:00:00 2001 From: Matt Fellows Date: Thu, 9 Apr 2020 10:18:06 +1000 Subject: [PATCH] feat: add support for wip pacts --- install/installer.go | 2 +- types/verify_request.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/install/installer.go b/install/installer.go index f8d19f16a..08ef50fa0 100644 --- a/install/installer.go +++ b/install/installer.go @@ -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" ) diff --git a/types/verify_request.go b/types/verify_request.go index ca4385bba..9f70dd8f3 100644 --- a/types/verify_request.go +++ b/types/verify_request.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "log" + "time" "github.com/pact-foundation/pact-go/proxy" ) @@ -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 @@ -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 }