From 18398cef73300049e01c5a40ec23e967cd6a3354 Mon Sep 17 00:00:00 2001 From: Matt Fellows Date: Sat, 27 Jun 2020 14:21:33 +1000 Subject: [PATCH] feat: update to standalone 1.86.0 and support new verifier options: --log-level and --log-dir --- install/installer.go | 2 +- types/verify_request.go | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/install/installer.go b/install/installer.go index 08ef50fa0..6efb73fb9 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.30.0, < 2.0.0" + verifierRange = ">= 1.31.0, < 2.0.0" brokerRange = ">= 1.22.3" ) diff --git a/types/verify_request.go b/types/verify_request.go index 9f70dd8f3..32845ceb5 100644 --- a/types/verify_request.go +++ b/types/verify_request.go @@ -105,6 +105,15 @@ type VerifyRequest struct { // Pull in new WIP pacts from _any_ tag (see pact.io/wip) IncludeWIPPactsSince *time.Time + // Specify an output directory to log all of the verification request/responses + // seen by the verification process. Useful to debug issues with your contract + // and API + PactLogDir string + + // Specify the log verbosity of the CLI verifier process spawned through verification + // Useful for debugging issues with the framework itself + PactLogLevel string + // Verbose increases verbosity of output // Deprecated Verbose bool @@ -217,5 +226,13 @@ func (v *VerifyRequest) Validate() error { v.Args = append(v.Args, "--include-wip-pacts-since", v.IncludeWIPPactsSince.Format(time.RFC3339)) } + if v.PactLogDir != "" { + v.Args = append(v.Args, "--log-dir", v.PactLogDir) + } + + if v.PactLogLevel != "" { + v.Args = append(v.Args, "--log-level", v.PactLogLevel) + } + return nil }