pact_broker-client 1.25.1 → 1.27.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release_gem.yml +35 -0
  3. data/.github/workflows/trigger_pact_cli_release.yml +15 -0
  4. data/.github/workflows/trigger_pact_docs_update.yml +19 -0
  5. data/CHANGELOG.md +39 -0
  6. data/Gemfile +10 -1
  7. data/README.md +4 -3
  8. data/appveyor.yml +1 -1
  9. data/doc/pacts/markdown/Pact Broker Client - Pact Broker.md +168 -10
  10. data/lib/pact_broker/client/can_i_deploy.rb +6 -0
  11. data/lib/pact_broker/client/cli/broker.rb +32 -0
  12. data/lib/pact_broker/client/cli/custom_thor.rb +12 -1
  13. data/lib/pact_broker/client/git.rb +2 -1
  14. data/lib/pact_broker/client/hal/entity.rb +12 -1
  15. data/lib/pact_broker/client/hal/http_client.rb +6 -0
  16. data/lib/pact_broker/client/hal/link.rb +4 -0
  17. data/lib/pact_broker/client/hal_client_methods.rb +15 -0
  18. data/lib/pact_broker/client/matrix/resource.rb +5 -1
  19. data/lib/pact_broker/client/pacticipants/create.rb +57 -0
  20. data/lib/pact_broker/client/pacts/list_latest_versions.rb +65 -0
  21. data/lib/pact_broker/client/publish_pacts.rb +1 -1
  22. data/lib/pact_broker/client/version.rb +1 -1
  23. data/lib/pact_broker/client/webhooks/test.rb +16 -0
  24. data/pact-broker-client.gemspec +3 -5
  25. data/script/prepare-release.sh +11 -0
  26. data/script/release-gem.sh +23 -0
  27. data/script/release.sh +1 -1
  28. data/script/trigger-release.sh +15 -0
  29. data/spec/integration/can_i_deploy_spec.rb +3 -3
  30. data/spec/integration/create_version_tag_spec.rb +2 -3
  31. data/spec/lib/pact_broker/client/can_i_deploy_spec.rb +22 -4
  32. data/spec/lib/pact_broker/client/pacticipants/create_spec.rb +28 -0
  33. data/spec/pacts/pact_broker_client-pact_broker.json +179 -10
  34. data/spec/service_providers/pact_broker_client_matrix_spec.rb +10 -10
  35. data/spec/service_providers/pact_helper.rb +29 -0
  36. data/spec/service_providers/pacticipants_create_spec.rb +118 -0
  37. metadata +29 -44
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+
3
+ output=$(curl -v -X POST https://api.github.com/repos/pact-foundation/pact_broker-client/dispatches \
4
+ -H 'Accept: application/vnd.github.everest-preview+json' \
5
+ -H "Authorization: Bearer $GITHUB_ACCESS_TOKEN" \
6
+ -d '{"event_type": "release-patch"}' 2>&1)
7
+
8
+ echo "$output" | sed "s/${GITHUB_ACCESS_TOKEN}/****/g"
9
+
10
+ if ! echo "${output}" | grep "HTTP\/1.1 204" > /dev/null; then
11
+ echo "$output" | sed "s/${GITHUB_ACCESS_TOKEN}/****/g"
12
+ echo "Failed to do the thing"
13
+ exit 1
14
+ fi
15
+
@@ -1,7 +1,7 @@
1
- describe "pact-broker can-i-deploy", skip_windows: true, skip_ci: true do
1
+ describe "pact-broker can-i-deploy", skip_windows: true do
2
2
  before(:all) do
3
- @pipe = IO.popen("bundle exec pact-stub-service spec/pacts/pact_broker_client-pact_broker.json -p 5000")
4
- sleep 2
3
+ @pipe = IO.popen("bundle exec pact-stub-service spec/pacts/pact_broker_client-pact_broker.json -p 5000 --log tmp/pact-stub-can-i-deploy.log")
4
+ sleep 4
5
5
  end
6
6
 
7
7
  context "when the pacticipants can be deployed" do
@@ -1,7 +1,6 @@
1
- # Currently failing on Travis, skip for now
2
- describe "pact-broker create-version-tag", skip_windows: true, skip_ci: true do
1
+ describe "pact-broker create-version-tag", skip_windows: true do
3
2
  before(:all) do
4
- @pipe = IO.popen("bundle exec pact-stub-service spec/pacts/pact_broker_client-pact_broker.json -p 5001")
3
+ @pipe = IO.popen("bundle exec pact-stub-service spec/pacts/pact_broker_client-pact_broker.json -p 5001 --log tmp/pact-stub-service-create-verison-tag.log")
5
4
  sleep 2
6
5
  end
7
6
 
@@ -9,11 +9,19 @@ module PactBroker
9
9
  let(:matrix_options) { {} }
10
10
  let(:pact_broker_client_options) { { foo: 'bar' } }
11
11
  let(:matrix_client) { instance_double('PactBroker::Client::Matrix') }
12
- let(:matrix) { instance_double('Matrix::Resource', deployable?: true, reason: 'some reason', any_unknown?: any_unknown, supports_unknown_count?: supports_unknown_count) }
13
- let(:any_unknown) { false }
12
+ let(:matrix) do
13
+ instance_double('Matrix::Resource',
14
+ deployable?: true,
15
+ reason: 'some reason',
16
+ any_unknown?: any_unknown,
17
+ supports_unknown_count?: supports_unknown_count,
18
+ unknown_count: unknown_count)
19
+ end
20
+ let(:unknown_count) { 0 }
21
+ let(:any_unknown) { unknown_count > 0 }
14
22
  let(:supports_unknown_count) { true }
15
23
  let(:retry_while_unknown) { 0 }
16
- let(:options) { { output: 'text', retry_while_unknown: retry_while_unknown, retry_interval: 5} }
24
+ let(:options) { { output: 'text', retry_while_unknown: retry_while_unknown, retry_interval: 5 } }
17
25
 
18
26
 
19
27
  before do
@@ -76,7 +84,17 @@ module PactBroker
76
84
  end
77
85
 
78
86
  context "when any_unknown? is true" do
79
- let(:any_unknown) { true }
87
+ before do
88
+ allow($stderr).to receive(:puts)
89
+ allow(Retry).to receive(:until_truthy_or_max_times)
90
+ end
91
+
92
+ let(:unknown_count) { 1 }
93
+
94
+ it "puts a message to stderr" do
95
+ expect($stderr).to receive(:puts).with("Waiting for 1 verification result to be published (maximum of 5 seconds)")
96
+ subject
97
+ end
80
98
 
81
99
  it "retries the request" do
82
100
  expect(Retry).to receive(:until_truthy_or_max_times).with(hash_including(times: 1, sleep: 5, sleep_first: true))
@@ -0,0 +1,28 @@
1
+ require 'pact_broker/client/pacticipants/create'
2
+
3
+ module PactBroker
4
+ module Client
5
+ module Pacticipants2
6
+ describe Create do
7
+ describe ".call" do
8
+ let(:pact_broker_client_options) { {} }
9
+ let(:broker_base_url) { "http://url" }
10
+ let(:params) { { name: 'Foo' } }
11
+
12
+ subject { Create.call(params, broker_base_url, pact_broker_client_options)}
13
+
14
+ context "when there is an http error" do
15
+ let!(:index_request) do
16
+ stub_request(:get, broker_base_url).to_return(status: 500, body: 'some error', headers: { "Content-Type" => "application/hal+json" } )
17
+ end
18
+
19
+ it "returns a failure result" do
20
+ expect(subject.success).to be false
21
+ expect(subject.message).to include 'some error'
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -192,7 +192,7 @@
192
192
  "request": {
193
193
  "method": "get",
194
194
  "path": "/matrix",
195
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][version]=4.5.6&latestby=cvpv"
195
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Bversion%5D=4.5.6&latestby=cvpv"
196
196
  },
197
197
  "response": {
198
198
  "status": 200,
@@ -242,7 +242,7 @@
242
242
  "request": {
243
243
  "method": "get",
244
244
  "path": "/matrix",
245
- "query": "q[][pacticipant]=Foo%20Thing&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][version]=4.5.6&latestby=cvpv"
245
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo%20Thing&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Bversion%5D=4.5.6&latestby=cvpv"
246
246
  },
247
247
  "response": {
248
248
  "status": 200,
@@ -292,7 +292,7 @@
292
292
  "request": {
293
293
  "method": "get",
294
294
  "path": "/matrix",
295
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.3&latestby=cvp&latest=true"
295
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&latestby=cvp&latest=true"
296
296
  },
297
297
  "response": {
298
298
  "status": 200,
@@ -342,7 +342,7 @@
342
342
  "request": {
343
343
  "method": "get",
344
344
  "path": "/matrix",
345
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][version]=9.9.9&latestby=cvpv"
345
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Bversion%5D=9.9.9&latestby=cvpv"
346
346
  },
347
347
  "response": {
348
348
  "status": 200,
@@ -366,7 +366,7 @@
366
366
  "request": {
367
367
  "method": "get",
368
368
  "path": "/matrix",
369
- "query": "q[][pacticipant]=Wiffle&q[][version]=1.2.3&q[][pacticipant]=Meep&q[][version]=9.9.9&latestby=cvpv"
369
+ "query": "q%5B%5D%5Bpacticipant%5D=Wiffle&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Meep&q%5B%5D%5Bversion%5D=9.9.9&latestby=cvpv"
370
370
  },
371
371
  "response": {
372
372
  "status": 400,
@@ -394,7 +394,7 @@
394
394
  "request": {
395
395
  "method": "get",
396
396
  "path": "/matrix",
397
- "query": "q[][pacticipant]=Foo&q[][pacticipant]=Bar&latestby=cvpv"
397
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bpacticipant%5D=Bar&latestby=cvpv"
398
398
  },
399
399
  "response": {
400
400
  "status": 200,
@@ -463,7 +463,7 @@
463
463
  "request": {
464
464
  "method": "get",
465
465
  "path": "/matrix",
466
- "query": "q[][pacticipant]=Foo&q[][pacticipant]=Bar&latestby=cvpv&success[]=true"
466
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bpacticipant%5D=Bar&latestby=cvpv&success%5B%5D=true"
467
467
  },
468
468
  "response": {
469
469
  "status": 200,
@@ -513,7 +513,7 @@
513
513
  "request": {
514
514
  "method": "get",
515
515
  "path": "/matrix",
516
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][latest]=true&q[][tag]=prod&latestby=cvpv"
516
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Blatest%5D=true&q%5B%5D%5Btag%5D=prod&latestby=cvpv"
517
517
  },
518
518
  "response": {
519
519
  "status": 200,
@@ -563,7 +563,7 @@
563
563
  "request": {
564
564
  "method": "get",
565
565
  "path": "/matrix",
566
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.4&q[][pacticipant]=Bar&q[][latest]=true&latestby=cvpv"
566
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.4&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Blatest%5D=true&latestby=cvpv"
567
567
  },
568
568
  "response": {
569
569
  "status": 200,
@@ -613,7 +613,7 @@
613
613
  "request": {
614
614
  "method": "get",
615
615
  "path": "/matrix",
616
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.3&latestby=cvp&latest=true&tag=prod"
616
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&latestby=cvp&latest=true&tag=prod"
617
617
  },
618
618
  "response": {
619
619
  "status": 200,
@@ -1249,6 +1249,161 @@
1249
1249
  }
1250
1250
  }
1251
1251
  },
1252
+ {
1253
+ "description": "a request for the index resource",
1254
+ "providerState": "the pacticipant relations are present",
1255
+ "request": {
1256
+ "method": "get",
1257
+ "path": "/",
1258
+ "headers": {
1259
+ "Accept": "application/hal+json"
1260
+ }
1261
+ },
1262
+ "response": {
1263
+ "status": 200,
1264
+ "headers": {
1265
+ "Content-Type": "application/hal+json;charset=utf-8"
1266
+ },
1267
+ "body": {
1268
+ "_links": {
1269
+ "pb:pacticipants": {
1270
+ "href": "http://localhost:1234/pacticipants"
1271
+ },
1272
+ "pb:pacticipant": {
1273
+ "href": "http://localhost:1234/pacticipants/{pacticipant}"
1274
+ }
1275
+ }
1276
+ },
1277
+ "matchingRules": {
1278
+ "$.body._links.pb:pacticipants.href": {
1279
+ "match": "regex",
1280
+ "regex": "http:\\/\\/.*"
1281
+ },
1282
+ "$.body._links.pb:pacticipant.href": {
1283
+ "match": "regex",
1284
+ "regex": "http:\\/\\/.*\\{pacticipant\\}"
1285
+ }
1286
+ }
1287
+ }
1288
+ },
1289
+ {
1290
+ "description": "a request to retrieve a pacticipant",
1291
+ "request": {
1292
+ "method": "get",
1293
+ "path": "/pacticipants/Foo",
1294
+ "headers": {
1295
+ "Accept": "application/hal+json"
1296
+ }
1297
+ },
1298
+ "response": {
1299
+ "status": 404,
1300
+ "headers": {
1301
+ }
1302
+ }
1303
+ },
1304
+ {
1305
+ "description": "a request to create a pacticipant",
1306
+ "request": {
1307
+ "method": "post",
1308
+ "path": "/pacticipants",
1309
+ "headers": {
1310
+ "Content-Type": "application/json",
1311
+ "Accept": "application/hal+json"
1312
+ },
1313
+ "body": {
1314
+ "name": "Foo",
1315
+ "repositoryUrl": "http://foo"
1316
+ }
1317
+ },
1318
+ "response": {
1319
+ "status": 201,
1320
+ "headers": {
1321
+ "Content-Type": "application/hal+json;charset=utf-8"
1322
+ },
1323
+ "body": {
1324
+ "name": "Foo",
1325
+ "repositoryUrl": "http://foo",
1326
+ "_links": {
1327
+ "self": {
1328
+ "href": "http://localhost:1234/pacticipants/Foo"
1329
+ }
1330
+ }
1331
+ },
1332
+ "matchingRules": {
1333
+ "$.body._links.self.href": {
1334
+ "match": "regex",
1335
+ "regex": "http:\\/\\/.*"
1336
+ }
1337
+ }
1338
+ }
1339
+ },
1340
+ {
1341
+ "description": "a request to retrieve a pacticipant",
1342
+ "providerState": "a pacticipant with name Foo exists",
1343
+ "request": {
1344
+ "method": "get",
1345
+ "path": "/pacticipants/Foo",
1346
+ "headers": {
1347
+ "Accept": "application/hal+json"
1348
+ }
1349
+ },
1350
+ "response": {
1351
+ "status": 200,
1352
+ "headers": {
1353
+ "Content-Type": "application/hal+json;charset=utf-8"
1354
+ },
1355
+ "body": {
1356
+ "_links": {
1357
+ "self": {
1358
+ "href": "http://localhost:1234/pacticipants/Foo"
1359
+ }
1360
+ }
1361
+ },
1362
+ "matchingRules": {
1363
+ "$.body._links.self.href": {
1364
+ "match": "regex",
1365
+ "regex": "http:\\/\\/.*"
1366
+ }
1367
+ }
1368
+ }
1369
+ },
1370
+ {
1371
+ "description": "a request to update a pacticipant",
1372
+ "providerState": "a pacticipant with name Foo exists",
1373
+ "request": {
1374
+ "method": "patch",
1375
+ "path": "/pacticipants/Foo",
1376
+ "headers": {
1377
+ "Content-Type": "application/json",
1378
+ "Accept": "application/hal+json"
1379
+ },
1380
+ "body": {
1381
+ "name": "Foo",
1382
+ "repositoryUrl": "http://foo"
1383
+ }
1384
+ },
1385
+ "response": {
1386
+ "status": 200,
1387
+ "headers": {
1388
+ "Content-Type": "application/hal+json;charset=utf-8"
1389
+ },
1390
+ "body": {
1391
+ "name": "Foo",
1392
+ "repositoryUrl": "http://foo",
1393
+ "_links": {
1394
+ "self": {
1395
+ "href": "http://localhost:1234/pacticipants/Foo"
1396
+ }
1397
+ }
1398
+ },
1399
+ "matchingRules": {
1400
+ "$.body._links.self.href": {
1401
+ "match": "regex",
1402
+ "regex": "http:\\/\\/.*"
1403
+ }
1404
+ }
1405
+ }
1406
+ },
1252
1407
  {
1253
1408
  "description": "a request to create a webhook with a JSON body for a consumer and provider",
1254
1409
  "providerState": "the 'Pricing Service' and 'Condor' already exist in the pact-broker",
@@ -1550,6 +1705,12 @@
1550
1705
  "_links": {
1551
1706
  "pb:webhooks": {
1552
1707
  "href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-WEBHOOKS"
1708
+ },
1709
+ "pb:pacticipants": {
1710
+ "href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-PACTICIPANTS"
1711
+ },
1712
+ "pb:pacticipant": {
1713
+ "href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-{pacticipant}"
1553
1714
  }
1554
1715
  }
1555
1716
  },
@@ -1557,6 +1718,14 @@
1557
1718
  "$.body._links.pb:webhooks.href": {
1558
1719
  "match": "regex",
1559
1720
  "regex": "http:\\/\\/.*"
1721
+ },
1722
+ "$.body._links.pb:pacticipants.href": {
1723
+ "match": "regex",
1724
+ "regex": "http:\\/\\/.*"
1725
+ },
1726
+ "$.body._links.pb:pacticipant.href": {
1727
+ "match": "regex",
1728
+ "regex": "http:\\/\\/.*{pacticipant}"
1560
1729
  }
1561
1730
  }
1562
1731
  }
@@ -19,7 +19,7 @@ module PactBroker::Client
19
19
  with(
20
20
  method: :get,
21
21
  path: "/matrix",
22
- query: "q[][pacticipant]=Foo&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][version]=4.5.6&latestby=cvpv"
22
+ query: "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Bversion%5D=4.5.6&latestby=cvpv"
23
23
  ).
24
24
  will_respond_with(
25
25
  status: 200,
@@ -42,7 +42,7 @@ module PactBroker::Client
42
42
  with(
43
43
  method: :get,
44
44
  path: "/matrix",
45
- query: "q[][pacticipant]=Foo%20Thing&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][version]=4.5.6&latestby=cvpv"
45
+ query: "q%5B%5D%5Bpacticipant%5D=Foo%20Thing&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Bversion%5D=4.5.6&latestby=cvpv"
46
46
  ).
47
47
  will_respond_with(
48
48
  status: 200,
@@ -67,7 +67,7 @@ module PactBroker::Client
67
67
  with(
68
68
  method: :get,
69
69
  path: "/matrix",
70
- query: "q[][pacticipant]=Foo&q[][version]=1.2.3&latestby=cvp&latest=true"
70
+ query: "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&latestby=cvp&latest=true"
71
71
  ).
72
72
  will_respond_with(
73
73
  status: 200,
@@ -92,7 +92,7 @@ module PactBroker::Client
92
92
  with(
93
93
  method: :get,
94
94
  path: "/matrix",
95
- query: "q[][pacticipant]=Foo&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][version]=9.9.9&latestby=cvpv"
95
+ query: "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Bversion%5D=9.9.9&latestby=cvpv"
96
96
  ).
97
97
  will_respond_with(
98
98
  status: 200,
@@ -119,7 +119,7 @@ module PactBroker::Client
119
119
  with(
120
120
  method: :get,
121
121
  path: "/matrix",
122
- query: "q[][pacticipant]=Wiffle&q[][version]=1.2.3&q[][pacticipant]=Meep&q[][version]=9.9.9&latestby=cvpv"
122
+ query: "q%5B%5D%5Bpacticipant%5D=Wiffle&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Meep&q%5B%5D%5Bversion%5D=9.9.9&latestby=cvpv"
123
123
  ).
124
124
  will_respond_with(
125
125
  status: 400,
@@ -147,7 +147,7 @@ module PactBroker::Client
147
147
  with(
148
148
  method: :get,
149
149
  path: "/matrix",
150
- query: "q[][pacticipant]=Foo&q[][pacticipant]=Bar&latestby=cvpv"
150
+ query: "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bpacticipant%5D=Bar&latestby=cvpv"
151
151
  ).
152
152
  will_respond_with(
153
153
  status: 200,
@@ -174,7 +174,7 @@ module PactBroker::Client
174
174
  with(
175
175
  method: :get,
176
176
  path: "/matrix",
177
- query: "q[][pacticipant]=Foo&q[][pacticipant]=Bar&latestby=cvpv&success[]=true"
177
+ query: "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bpacticipant%5D=Bar&latestby=cvpv&success%5B%5D=true"
178
178
  ).
179
179
  will_respond_with(
180
180
  status: 200,
@@ -200,7 +200,7 @@ module PactBroker::Client
200
200
  with(
201
201
  method: :get,
202
202
  path: "/matrix",
203
- query: "q[][pacticipant]=Foo&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][latest]=true&q[][tag]=prod&latestby=cvpv"
203
+ query: "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Blatest%5D=true&q%5B%5D%5Btag%5D=prod&latestby=cvpv"
204
204
  ).
205
205
  will_respond_with(
206
206
  status: 200,
@@ -226,7 +226,7 @@ module PactBroker::Client
226
226
  with(
227
227
  method: :get,
228
228
  path: "/matrix",
229
- query: "q[][pacticipant]=Foo&q[][version]=1.2.4&q[][pacticipant]=Bar&q[][latest]=true&latestby=cvpv"
229
+ query: "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.4&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Blatest%5D=true&latestby=cvpv"
230
230
  ).
231
231
  will_respond_with(
232
232
  status: 200,
@@ -252,7 +252,7 @@ module PactBroker::Client
252
252
  with(
253
253
  method: :get,
254
254
  path: "/matrix",
255
- query: "q[][pacticipant]=Foo&q[][version]=1.2.3&latestby=cvp&latest=true&tag=prod"
255
+ query: "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&latestby=cvp&latest=true&tag=prod"
256
256
  ).
257
257
  will_respond_with(
258
258
  status: 200,