pact_broker 2.76.2 → 2.79.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +12 -0
- data/.github/workflows/release_gem.yml +1 -0
- data/.github/workflows/test-ruby-3.yml +19 -0
- data/.github/workflows/test.yml +16 -7
- data/.gitignore +3 -1
- data/CHANGELOG.md +53 -0
- data/DEVELOPER_DOCUMENTATION.md +13 -0
- data/DEVELOPER_SETUP.md +62 -3
- data/Dockerfile +1 -0
- data/ISSUES.md +7 -7
- data/config.ru +2 -1
- data/db/ddl_statements/head_pact_tags.rb +24 -1
- data/db/ddl_statements/latest_tagged_pact_consumer_version_orders.rb +11 -0
- data/db/ddl_statements/latest_tagged_pact_publications.rb +6 -0
- data/db/ddl_statements/latest_verification_ids_for_consumer_version_tags.rb +13 -0
- data/db/migrations/20210117_add_branch_to_version.rb +9 -0
- data/db/migrations/20210202_add_created_at_to_head_pact_tags.rb +14 -0
- data/db/migrations/20210205_add_pacticipant_id_to_tag.rb +17 -0
- data/db/migrations/20210206_add_index_to_tags_and_versions.rb +27 -0
- data/db/migrations/20210207_optimise_latest_verification_ids_for_consumer_version_tags.rb +13 -0
- data/db/migrations/20210208_optimise_latest_tagged_pact_cv_orders.rb +13 -0
- data/db/migrations/20210210_create_environments_table.rb +16 -0
- data/docker-compose-dev-postgres.yml +9 -1
- data/lib/pact_broker/api.rb +7 -2
- data/lib/pact_broker/api/contracts/dry_validation_predicates.rb +8 -0
- data/lib/pact_broker/api/contracts/environment_schema.rb +49 -0
- data/lib/pact_broker/api/decorators/base_decorator.rb +11 -0
- data/lib/pact_broker/api/decorators/dashboard_decorator.rb +5 -1
- data/lib/pact_broker/api/decorators/environment_decorator.rb +30 -0
- data/lib/pact_broker/api/decorators/environments_decorator.rb +21 -0
- data/lib/pact_broker/api/decorators/matrix_decorator.rb +3 -1
- data/lib/pact_broker/api/decorators/verifiable_pacts_query_decorator.rb +2 -0
- data/lib/pact_broker/api/decorators/version_decorator.rb +15 -2
- data/lib/pact_broker/api/pact_broker_urls.rb +8 -0
- data/lib/pact_broker/api/resources/default_base_resource.rb +18 -0
- data/lib/pact_broker/api/resources/environment.rb +76 -0
- data/lib/pact_broker/api/resources/environments.rb +75 -0
- data/lib/pact_broker/api/resources/index.rb +20 -0
- data/lib/pact_broker/api/resources/latest_version.rb +27 -0
- data/lib/pact_broker/api/resources/provider_pacts_for_verification.rb +1 -0
- data/lib/pact_broker/api/resources/version.rb +15 -9
- data/lib/pact_broker/app.rb +1 -1
- data/lib/pact_broker/certificates/certificate.rb +1 -1
- data/lib/pact_broker/config/setting.rb +1 -1
- data/lib/pact_broker/config/space_delimited_integer_list.rb +25 -0
- data/lib/pact_broker/configuration.rb +22 -1
- data/lib/pact_broker/db/data_migrations/helpers.rb +4 -0
- data/lib/pact_broker/db/data_migrations/set_extra_columns_for_tags.rb +29 -0
- data/lib/pact_broker/db/migrate_data.rb +1 -0
- data/lib/pact_broker/db/seed_example_data.rb +13 -13
- data/lib/pact_broker/deployments/environment.rb +15 -0
- data/lib/pact_broker/deployments/environment_service.rb +39 -0
- data/lib/pact_broker/doc/views/index/environment.markdown +37 -0
- data/lib/pact_broker/doc/views/index/environments.markdown +53 -0
- data/lib/pact_broker/doc/views/index/latest-pact-versions.markdown +1 -1
- data/lib/pact_broker/doc/views/index/pacticipant-version-tag.markdown +1 -0
- data/lib/pact_broker/doc/views/index/pacticipant-version.markdown +13 -0
- data/lib/pact_broker/domain/index_item.rb +18 -4
- data/lib/pact_broker/domain/pacticipant.rb +9 -5
- data/lib/pact_broker/domain/tag.rb +131 -71
- data/lib/pact_broker/domain/verification.rb +3 -2
- data/lib/pact_broker/domain/version.rb +58 -23
- data/lib/pact_broker/domain/webhook.rb +6 -3
- data/lib/pact_broker/index/service.rb +55 -49
- data/lib/pact_broker/locale/en.yml +3 -1
- data/lib/pact_broker/matrix/quick_row.rb +8 -0
- data/lib/pact_broker/metrics/service.rb +1 -1
- data/lib/pact_broker/pacts/eager_loaders.rb +52 -0
- data/lib/pact_broker/pacts/latest_pact_publication_id_for_consumer_version.rb +18 -13
- data/lib/pact_broker/pacts/lazy_loaders.rb +14 -0
- data/lib/pact_broker/pacts/pact_publication.rb +38 -84
- data/lib/pact_broker/pacts/pact_publication_dataset_module.rb +297 -0
- data/lib/pact_broker/pacts/pact_version.rb +1 -2
- data/lib/pact_broker/pacts/pacts_for_verification_repository.rb +286 -0
- data/lib/pact_broker/pacts/repository.rb +5 -240
- data/lib/pact_broker/pacts/selected_pact.rb +4 -0
- data/lib/pact_broker/pacts/selector.rb +56 -1
- data/lib/pact_broker/pacts/selectors.rb +16 -0
- data/lib/pact_broker/pacts/service.rb +2 -6
- data/lib/pact_broker/pacts/squash_pacts_for_verification.rb +1 -4
- data/lib/pact_broker/pacts/verifiable_pact.rb +23 -2
- data/lib/pact_broker/pacts/verifiable_pact_messages.rb +56 -16
- data/lib/pact_broker/repositories/helpers.rb +4 -0
- data/lib/pact_broker/services.rb +9 -0
- data/lib/pact_broker/tags/eager_loaders.rb +47 -0
- data/lib/pact_broker/tags/repository.rb +3 -1
- data/lib/pact_broker/tags/service.rb +0 -3
- data/lib/pact_broker/tags/tag_with_latest_flag.rb +1 -0
- data/lib/pact_broker/test/http_test_data_builder.rb +23 -7
- data/lib/pact_broker/test/test_data_builder.rb +50 -3
- data/lib/pact_broker/ui/view_models/index_item.rb +19 -2
- data/lib/pact_broker/ui/view_models/matrix_line.rb +38 -2
- data/lib/pact_broker/ui/views/index/show-with-tags.haml +14 -6
- data/lib/pact_broker/ui/views/matrix/show.haml +12 -2
- data/lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb +7 -5
- data/lib/pact_broker/version.rb +1 -1
- data/lib/pact_broker/versions/eager_loaders.rb +71 -0
- data/lib/pact_broker/versions/lazy_loaders.rb +13 -0
- data/lib/pact_broker/versions/repository.rb +22 -2
- data/lib/pact_broker/versions/service.rb +5 -1
- data/lib/pact_broker/webhooks/execution.rb +3 -2
- data/lib/pact_broker/webhooks/latest_triggered_webhook.rb +2 -0
- data/lib/pact_broker/webhooks/triggered_webhook.rb +11 -4
- data/lib/pact_broker/webhooks/webhook.rb +1 -1
- data/lib/pact_broker/webhooks/webhook_event.rb +1 -1
- data/lib/pact_broker/webhooks/webhook_execution_result.rb +6 -1
- data/lib/pact_broker/webhooks/webhook_request_logger.rb +7 -1
- data/lib/rack/pact_broker/set_base_url.rb +35 -5
- data/lib/sequel/plugins/upsert.rb +18 -4
- data/pact_broker.gemspec +1 -1
- data/public/javascripts/clipboard.js +8 -2
- data/public/stylesheets/index.css +26 -2
- data/public/stylesheets/matrix.css +0 -21
- data/regression/can_i_deploy_spec.rb +5 -4
- data/regression/index_spec.rb +26 -0
- data/regression/regression_helper.rb +29 -3
- data/regression/script/clear.sh +3 -0
- data/regression/script/run.sh +3 -0
- data/script/demonstrate-version-branches.rb +33 -0
- data/script/pry.rb +2 -2
- data/spec/features/create_environment_spec.rb +47 -0
- data/spec/features/create_tag_spec.rb +32 -0
- data/spec/features/create_version_spec.rb +70 -0
- data/spec/features/delete_environment_spec.rb +16 -0
- data/spec/features/end_deployment_spec.rb +29 -0
- data/spec/features/get_environment_spec.rb +19 -0
- data/spec/features/get_environments_spec.rb +20 -0
- data/spec/features/record_deployment_spec.rb +28 -0
- data/spec/features/update_environment_spec.rb +44 -0
- data/spec/fixtures/approvals/modifiable_resources.approved.json +6 -0
- data/spec/fixtures/dashboard.json +4 -2
- data/spec/lib/pact_broker/api/contracts/environment_schema_spec.rb +83 -0
- data/spec/lib/pact_broker/api/decorators/dashboard_decorator_spec.rb +4 -2
- data/spec/lib/pact_broker/api/decorators/matrix_decorator_spec.rb +11 -6
- data/spec/lib/pact_broker/api/decorators/verifiable_pacts_query_decorator_spec.rb +6 -0
- data/spec/lib/pact_broker/api/decorators/version_decorator_spec.rb +18 -0
- data/spec/lib/pact_broker/api/resources/default_base_resource_approval_spec.rb +1 -1
- data/spec/lib/pact_broker/api/resources/provider_pacts_for_verification_spec.rb +4 -0
- data/spec/lib/pact_broker/api/resources/webhook_execution_result_spec.rb +56 -0
- data/spec/lib/pact_broker/config/space_delimited_integer_list_spec.rb +47 -0
- data/spec/lib/pact_broker/configuration_spec.rb +12 -0
- data/spec/lib/pact_broker/domain/tag_spec.rb +101 -27
- data/spec/lib/pact_broker/domain/version_spec.rb +103 -15
- data/spec/lib/pact_broker/domain/webhook_spec.rb +1 -1
- data/spec/lib/pact_broker/index/service_spec.rb +89 -15
- data/spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb +400 -0
- data/spec/lib/pact_broker/pacts/pact_publication_spec.rb +434 -14
- data/spec/lib/pact_broker/pacts/repository_find_for_verification_fallback_spec.rb +1 -1
- data/spec/lib/pact_broker/pacts/repository_find_for_verification_spec.rb +1 -1
- data/spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_branch_spec.rb +224 -0
- data/spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_spec.rb +20 -7
- data/spec/lib/pact_broker/pacts/selector_spec.rb +3 -2
- data/spec/lib/pact_broker/pacts/service_find_for_verification_spec.rb +2 -3
- data/spec/lib/pact_broker/pacts/service_spec.rb +2 -2
- data/spec/lib/pact_broker/pacts/verifiable_pact_messages_spec.rb +57 -10
- data/spec/lib/pact_broker/tags/repository_spec.rb +2 -0
- data/spec/lib/pact_broker/versions/repository_spec.rb +54 -0
- data/spec/lib/pact_broker/webhooks/webhook_request_logger_spec.rb +8 -0
- data/spec/lib/rack/pact_broker/set_base_url_spec.rb +86 -0
- data/spec/lib/sequel/plugins/upsert_spec.rb +31 -3
- data/spec/migrations/change_migration_strategy_spec.rb +3 -3
- data/spec/service_consumers/hal_relation_proxy_app.rb +3 -1
- data/spec/service_consumers/provider_states_for_pact_broker_client.rb +16 -0
- data/spec/spec_helper.rb +17 -5
- data/spec/support/approvals.rb +24 -0
- data/spec/support/shared_examples_for_responses.rb +11 -0
- data/tasks/database.rb +1 -1
- data/tasks/db.rake +1 -0
- data/tasks/rspec.rake +1 -1
- data/vendor/hal-browser/styles.css +6 -0
- metadata +70 -11
@@ -23,6 +23,8 @@ module PactBroker
|
|
23
23
|
it "sets the properties" do
|
24
24
|
expect(subject.name).to eq "prod"
|
25
25
|
expect(subject.version.id).to eq td.version.id
|
26
|
+
expect(subject.version_order).to eq td.version.order
|
27
|
+
expect(subject.pacticipant_id).to eq td.version.pacticipant_id
|
26
28
|
end
|
27
29
|
|
28
30
|
context "when the tag already exists" do
|
@@ -122,6 +122,60 @@ module PactBroker
|
|
122
122
|
end
|
123
123
|
end
|
124
124
|
end
|
125
|
+
|
126
|
+
describe "#create_or_overwrite" do
|
127
|
+
before do
|
128
|
+
td.subtract_day
|
129
|
+
.create_consumer("Foo")
|
130
|
+
.create_consumer_version(version_number, branch: "original-branch", build_url: "original-build-url")
|
131
|
+
.create_consumer_version_tag("dev")
|
132
|
+
end
|
133
|
+
|
134
|
+
let(:pacticipant) { td.and_return(:consumer) }
|
135
|
+
let(:version_number) { "1234" }
|
136
|
+
let(:tags) { nil }
|
137
|
+
let(:open_struct_version) { OpenStruct.new(branch: "new-branch", tags: tags) }
|
138
|
+
|
139
|
+
subject { Repository.new.create_or_overwrite(pacticipant, version_number, open_struct_version) }
|
140
|
+
|
141
|
+
it "overwrites the values" do
|
142
|
+
expect(subject.branch).to eq "new-branch"
|
143
|
+
expect(subject.build_url).to eq nil
|
144
|
+
end
|
145
|
+
|
146
|
+
it "does not change the tags" do
|
147
|
+
expect { subject }.to_not change { PactBroker::Domain::Version.for("Foo", "1234").tags }
|
148
|
+
end
|
149
|
+
|
150
|
+
context "when there are tags specified" do
|
151
|
+
let(:tags) { [ OpenStruct.new(name: "main")] }
|
152
|
+
|
153
|
+
it "overwrites the tags" do
|
154
|
+
expect(subject.tags.count).to eq 1
|
155
|
+
expect(subject.tags.first.name).to eq "main"
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
it "does not change the created date" do
|
160
|
+
expect { subject }.to_not change { PactBroker::Domain::Version.for("Foo", "1234").created_at }
|
161
|
+
end
|
162
|
+
|
163
|
+
it "does change the updated date" do
|
164
|
+
expect { subject }.to change { PactBroker::Domain::Version.for("Foo", "1234").updated_at }
|
165
|
+
end
|
166
|
+
|
167
|
+
it "maintains the order" do
|
168
|
+
expect { subject }.to_not change { PactBroker::Domain::Version.for("Foo", "1234").order }
|
169
|
+
end
|
170
|
+
|
171
|
+
context "when the version does not already exist" do
|
172
|
+
let(:version) { OpenStruct.new(number: "555", branch: "new-branch") }
|
173
|
+
|
174
|
+
it "sets the order" do
|
175
|
+
expect(subject.order).to_not be nil
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
125
179
|
end
|
126
180
|
end
|
127
181
|
end
|
@@ -129,6 +129,14 @@ module PactBroker
|
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
132
|
+
context "when the response code '100' is not in 'webhook_http_code_success'" do
|
133
|
+
let(:status) { 100 }
|
134
|
+
|
135
|
+
it "not successful, code '100' not in 'webhook_http_code_success'" do
|
136
|
+
expect(logs).to include "oops"
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
132
140
|
context "when the response code is not successful" do
|
133
141
|
let(:status) { 400 }
|
134
142
|
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require 'rack/pact_broker/set_base_url'
|
2
|
+
|
3
|
+
module Rack
|
4
|
+
module PactBroker
|
5
|
+
describe SetBaseUrl do
|
6
|
+
let(:base_urls) { ["http://pact-broker"] }
|
7
|
+
let(:rack_env) { {} }
|
8
|
+
let(:target_app) { double('app', call: [200, {}, []]) }
|
9
|
+
let(:app) { SetBaseUrl.new(target_app, base_urls) }
|
10
|
+
|
11
|
+
subject { get("/", {}, rack_env) }
|
12
|
+
|
13
|
+
describe "#call" do
|
14
|
+
context "when the base_url is already set" do
|
15
|
+
let(:rack_env) { { "pactbroker.base_url" => "http://foo"} }
|
16
|
+
|
17
|
+
it "does not overwrite it" do
|
18
|
+
expect(target_app).to receive(:call).with(hash_including("pactbroker.base_url" => "http://foo"))
|
19
|
+
subject
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context "when there is one base URL" do
|
24
|
+
it "sets that base_url" do
|
25
|
+
expect(target_app).to receive(:call).with(hash_including("pactbroker.base_url" => "http://pact-broker"))
|
26
|
+
subject
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "when there are no base URLs" do
|
31
|
+
let(:base_urls) { [] }
|
32
|
+
|
33
|
+
it "sets the base URL to nil" do
|
34
|
+
expect(target_app).to receive(:call).with(hash_including("pactbroker.base_url" => nil))
|
35
|
+
subject
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "when there are multiple base URLs" do
|
40
|
+
let(:base_urls) { ["https://foo", "https://pact-broker-external", "http://pact-broker-internal"] }
|
41
|
+
|
42
|
+
let(:host) { "pact-broker-internal" }
|
43
|
+
let(:scheme) { "http" }
|
44
|
+
let(:forwarded_host) { "pact-broker-external" }
|
45
|
+
let(:forwarded_scheme) { "https" }
|
46
|
+
let(:rack_env) do
|
47
|
+
{
|
48
|
+
Rack::HTTP_HOST => host,
|
49
|
+
Rack::RACK_URL_SCHEME => scheme,
|
50
|
+
"HTTP_X_FORWARDED_HOST" => forwarded_host,
|
51
|
+
"HTTP_X_FORWARDED_SCHEME" => forwarded_scheme
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
context "when the base URL created taking any X-Forwarded headers into account matches one of the base URLs" do
|
56
|
+
it "uses that base URL" do
|
57
|
+
expect(target_app).to receive(:call).with(hash_including("pactbroker.base_url" => "https://pact-broker-external"))
|
58
|
+
subject
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context "when the base URL created NOT taking the X-Forwarded headers into account matches one of the base URLs (potential cache poisoning)" do
|
63
|
+
let(:forwarded_host) { "pact-broker-external-wrong" }
|
64
|
+
|
65
|
+
it "uses that base URL" do
|
66
|
+
expect(target_app).to receive(:call).with(hash_including("pactbroker.base_url" => "http://pact-broker-internal"))
|
67
|
+
subject
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
context "when neither base URL matches the base URLs (potential cache poisoning)" do
|
72
|
+
before do
|
73
|
+
rack_env["HTTP_HOST"] = "silly-buggers-1"
|
74
|
+
rack_env["HTTP_X_FORWARDED_HOST"] = "silly-buggers-1"
|
75
|
+
end
|
76
|
+
|
77
|
+
it "uses the first base URL" do
|
78
|
+
expect(target_app).to receive(:call).with(hash_including("pactbroker.base_url" => "https://foo"))
|
79
|
+
subject
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -24,6 +24,12 @@ module Sequel
|
|
24
24
|
plugin :upsert, identifying_columns: [:provider_id, :consumer_version_id]
|
25
25
|
end
|
26
26
|
|
27
|
+
describe PacticipantNoUpsert do
|
28
|
+
it "has an _insert_dataset method" do
|
29
|
+
expect(PacticipantNoUpsert.private_instance_methods).to include (:_insert_dataset)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
27
33
|
describe "LatestPactPublicationIdForConsumerVersion" do
|
28
34
|
before do
|
29
35
|
td.create_pact_with_hierarchy("Foo", "1", "Bar")
|
@@ -102,10 +108,20 @@ module Sequel
|
|
102
108
|
|
103
109
|
context "when a duplicate Version is inserted with upsert" do
|
104
110
|
let!(:pacticipant) { Pacticipant.new(name: "Foo").save }
|
105
|
-
let!(:original_version)
|
111
|
+
let!(:original_version) do
|
112
|
+
version = Version.new(
|
113
|
+
number: "1",
|
114
|
+
pacticipant_id: pacticipant.id,
|
115
|
+
branch: "original-branch",
|
116
|
+
build_url: "original-url"
|
117
|
+
).upsert
|
118
|
+
Version.where(id: version.id).update(created_at: yesterday, updated_at: yesterday)
|
119
|
+
version
|
120
|
+
end
|
121
|
+
let(:yesterday) { DateTime.now - 2 }
|
106
122
|
|
107
123
|
subject do
|
108
|
-
Version.new(number: "1", pacticipant_id: pacticipant.id).upsert
|
124
|
+
Version.new(number: "1", pacticipant_id: pacticipant.id, branch: "new-branch").upsert
|
109
125
|
end
|
110
126
|
|
111
127
|
it "does not raise an error" do
|
@@ -113,12 +129,24 @@ module Sequel
|
|
113
129
|
end
|
114
130
|
|
115
131
|
it "sets the values on the object" do
|
116
|
-
expect(subject.
|
132
|
+
expect(subject.branch).to eq "new-branch"
|
133
|
+
end
|
134
|
+
|
135
|
+
it "nils out values that weren't set on the second model" do
|
136
|
+
expect(subject.build_url).to eq nil
|
117
137
|
end
|
118
138
|
|
119
139
|
it "does not insert another row" do
|
120
140
|
expect { subject }.to_not change { Version.count }
|
121
141
|
end
|
142
|
+
|
143
|
+
it "does not change the created_at" do
|
144
|
+
expect { subject }.to_not change { Version.where(number: "1").first.created_at }
|
145
|
+
end
|
146
|
+
|
147
|
+
it "does change the updated_at" do
|
148
|
+
expect { subject }.to change { Version.where(number: "1").first.updated_at }
|
149
|
+
end
|
122
150
|
end
|
123
151
|
end
|
124
152
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
|
3
|
-
describe "changing from integer to timestamp migrations", no_db_clean: true, skip:
|
3
|
+
describe "changing from integer to timestamp migrations", no_db_clean: true, skip: "don't need to run this repeatedly any more, it's so old, and it's failing now due to other reasons" do
|
4
4
|
|
5
5
|
TEST_DIR = "db/test/change_migration_strategy"
|
6
6
|
DATABASE_PATH = "#{TEST_DIR}/pact_broker_database.sqlite3"
|
@@ -25,7 +25,7 @@ describe "changing from integer to timestamp migrations", no_db_clean: true, ski
|
|
25
25
|
|
26
26
|
it "uses pact_broker v 2.6.0" do
|
27
27
|
Dir.chdir(TEST_DIR) do
|
28
|
-
Bundler.
|
28
|
+
Bundler.with_original_env do
|
29
29
|
execute('bundle install --gemfile before/Gemfile --jobs=3 --retry=3')
|
30
30
|
expect(execute('BUNDLE_GEMFILE=before/Gemfile bundle exec rake pact_broker:version').strip).to eq '2.6.0'
|
31
31
|
end
|
@@ -34,7 +34,7 @@ describe "changing from integer to timestamp migrations", no_db_clean: true, ski
|
|
34
34
|
|
35
35
|
it "migrates using integer migrations using pact_broker v2.6.0" do
|
36
36
|
Dir.chdir(TEST_DIR) do
|
37
|
-
Bundler.
|
37
|
+
Bundler.with_original_env do
|
38
38
|
execute('BUNDLE_GEMFILE=before/Gemfile bundle exec rake pact_broker:db:migrate[35]')
|
39
39
|
output = execute('BUNDLE_GEMFILE=before/Gemfile bundle exec rake pact_broker:db:version')
|
40
40
|
expect(output.strip).to eq "35"
|
@@ -9,7 +9,9 @@ class HalRelationProxyApp
|
|
9
9
|
'/HAL-REL-PLACEHOLDER-INDEX-PB-LATEST-VERSION-Condor' =>
|
10
10
|
'/pacticipants/Condor/latest-version',
|
11
11
|
'/HAL-REL-PLACEHOLDER-PB-WEBHOOKS' =>
|
12
|
-
'/webhooks'
|
12
|
+
'/webhooks',
|
13
|
+
'/HAL-REL-PLACEHOLDER-INDEX-PB-PACTICIPANT-VERSION-Foo-26f353580936ad3b9baddb17b00e84f33c69e7cb' =>
|
14
|
+
'/pacticipants/Foo/versions/26f353580936ad3b9baddb17b00e84f33c69e7cb'
|
13
15
|
}
|
14
16
|
|
15
17
|
RESPONSE_BODY_REPLACEMENTS = {
|
@@ -255,4 +255,20 @@ Pact.provider_states_for "Pact Broker Client" do
|
|
255
255
|
.create_consumer("Foo")
|
256
256
|
end
|
257
257
|
end
|
258
|
+
|
259
|
+
provider_state "the pb:pacticipant-version relation exists in the index resource" do
|
260
|
+
no_op
|
261
|
+
end
|
262
|
+
|
263
|
+
provider_state "version 26f353580936ad3b9baddb17b00e84f33c69e7cb of pacticipant Foo does not exist" do
|
264
|
+
no_op
|
265
|
+
end
|
266
|
+
|
267
|
+
provider_state "version 26f353580936ad3b9baddb17b00e84f33c69e7cb of pacticipant Foo does exist" do
|
268
|
+
set_up do
|
269
|
+
TestDataBuilder.new
|
270
|
+
.create_consumer("Foo")
|
271
|
+
.create_consumer_version("26f353580936ad3b9baddb17b00e84f33c69e7cb")
|
272
|
+
end
|
273
|
+
end
|
258
274
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# Can't stop the gression tests loading the spec_helper becaues of the .rspec file
|
2
|
+
# At least we can avoid executing it.
|
3
|
+
return if ENV["REGRESSION"] == "true"
|
4
|
+
|
1
5
|
$: << File.expand_path("../../", __FILE__)
|
2
6
|
|
3
7
|
RACK_ENV = ENV['RACK_ENV'] = 'test'
|
@@ -12,7 +16,6 @@ require 'rspec/pact/matchers'
|
|
12
16
|
require 'sucker_punch/testing/inline'
|
13
17
|
require 'webmock/rspec'
|
14
18
|
require 'pact_broker/policies'
|
15
|
-
require 'approvals/rspec'
|
16
19
|
|
17
20
|
Dir.glob("./spec/support/**/*.rb") { |file| require file }
|
18
21
|
|
@@ -20,10 +23,6 @@ WebMock.disable_net_connect!(allow_localhost: true)
|
|
20
23
|
|
21
24
|
I18n.config.enforce_available_locales = false
|
22
25
|
|
23
|
-
Approvals.configure do |c|
|
24
|
-
c.approvals_path = 'spec/fixtures/approvals/'
|
25
|
-
end
|
26
|
-
|
27
26
|
RSpec.configure do | config |
|
28
27
|
config.before :each do
|
29
28
|
PactBroker.reset_configuration
|
@@ -53,6 +52,19 @@ RSpec.configure do | config |
|
|
53
52
|
config.example_status_persistence_file_path = "./spec/examples.txt"
|
54
53
|
config.filter_run_excluding skip: true
|
55
54
|
|
55
|
+
config.after(:each) do | example, something |
|
56
|
+
if example.exception.is_a?(Approvals::ApprovalError)
|
57
|
+
require "pact/support"
|
58
|
+
parts = example.exception.message.split('"')
|
59
|
+
received_file = parts[1]
|
60
|
+
approved_file = parts[3]
|
61
|
+
received_hash = JSON.parse(File.read(received_file))
|
62
|
+
approved_hash = JSON.parse(File.read(approved_file))
|
63
|
+
diff = Pact::Matchers.diff(approved_hash, received_hash)
|
64
|
+
puts Pact::Matchers::UnixDiffFormatter.call(diff)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
56
68
|
def app
|
57
69
|
PactBroker::API
|
58
70
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'approvals/rspec'
|
2
|
+
require 'pact/support'
|
3
|
+
|
4
|
+
Approvals.configure do |c|
|
5
|
+
c.approvals_path = 'spec/fixtures/approvals/'
|
6
|
+
end
|
7
|
+
|
8
|
+
def print_diff(exception)
|
9
|
+
parts = exception.message.split('"')
|
10
|
+
received_file = parts[1]
|
11
|
+
approved_file = parts[3]
|
12
|
+
received_hash = JSON.parse(File.read(received_file))
|
13
|
+
approved_hash = JSON.parse(File.read(approved_file))
|
14
|
+
diff = Pact::Matchers.diff(approved_hash, received_hash)
|
15
|
+
puts Pact::Matchers::UnixDiffFormatter.call(diff)
|
16
|
+
end
|
17
|
+
|
18
|
+
RSpec.configure do | config |
|
19
|
+
config.after(:each) do | example |
|
20
|
+
if example.exception.is_a?(Approvals::ApprovalError)
|
21
|
+
print_diff(example.exception)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -22,6 +22,17 @@ RSpec::Matchers.define :be_a_hal_json_success_response do
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
RSpec::Matchers.define :be_a_hal_json_created_response do
|
26
|
+
match do | actual |
|
27
|
+
expect(actual.status).to be 201
|
28
|
+
expect(actual.headers['Content-Type']).to eq 'application/hal+json;charset=utf-8'
|
29
|
+
end
|
30
|
+
|
31
|
+
failure_message do
|
32
|
+
"Expected creation successful json response, got #{actual.status} #{actual.headers['Content-Type']} with body #{actual.body}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
25
36
|
RSpec::Matchers.define :be_a_json_response do
|
26
37
|
match do | actual |
|
27
38
|
expect(actual.headers['Content-Type']).to eq 'application/hal+json;charset=utf-8'
|
data/tasks/database.rb
CHANGED
data/tasks/db.rake
CHANGED
@@ -98,6 +98,7 @@ namespace :db do
|
|
98
98
|
desc 'Annotate the Sequel domain classes with schema information'
|
99
99
|
task :annotate do
|
100
100
|
begin
|
101
|
+
raise "Need to set INSTALL_PG=true" unless ENV["INSTALL_PG"] == "true"
|
101
102
|
ENV['RACK_ENV'] = 'test'
|
102
103
|
ENV['DATABASE_ADAPTER'] = 'docker_postgres'
|
103
104
|
load 'tasks/docker_database.rb'
|
data/tasks/rspec.rake
CHANGED
@@ -11,7 +11,7 @@ end
|
|
11
11
|
|
12
12
|
RSpec::Core::RakeTask.new('regression') do |task|
|
13
13
|
task.pattern = 'regression/**{,/*/**}/*_spec.rb'
|
14
|
-
task.rspec_opts = '--require regression/regression_helper.rb'
|
14
|
+
task.rspec_opts = '--require ./regression/regression_helper.rb'
|
15
15
|
end
|
16
16
|
|
17
17
|
RSpec::Core::RakeTask.new('spec:slow') do |task|
|
@@ -50,6 +50,10 @@ body table.table {
|
|
50
50
|
font-size: 11px;
|
51
51
|
}
|
52
52
|
|
53
|
+
body table.table td:nth-child(3) {
|
54
|
+
word-wrap: break-word;
|
55
|
+
}
|
56
|
+
|
53
57
|
.location-bar-container {
|
54
58
|
line-height: 30px;
|
55
59
|
}
|
@@ -70,7 +74,9 @@ body table.table {
|
|
70
74
|
}
|
71
75
|
.embedded-resource-title {
|
72
76
|
font-style: italic;
|
77
|
+
word-wrap: break-word;
|
73
78
|
}
|
79
|
+
|
74
80
|
.embedded-resource-title:before {
|
75
81
|
content: "\"";
|
76
82
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact_broker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.79.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bethany Skurrie
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-03-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -60,20 +60,14 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
64
|
-
- - ">="
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: 2.3.1
|
63
|
+
version: 2.3.3
|
67
64
|
type: :runtime
|
68
65
|
prerelease: false
|
69
66
|
version_requirements: !ruby/object:Gem::Requirement
|
70
67
|
requirements:
|
71
68
|
- - "~>"
|
72
69
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: 2.3.1
|
70
|
+
version: 2.3.3
|
77
71
|
- !ruby/object:Gem::Dependency
|
78
72
|
name: dry-validation
|
79
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -373,6 +367,7 @@ files:
|
|
373
367
|
- ".github/ISSUE_TEMPLATE.md"
|
374
368
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
375
369
|
- ".github/workflows/release_gem.yml"
|
370
|
+
- ".github/workflows/test-ruby-3.yml"
|
376
371
|
- ".github/workflows/test.yml"
|
377
372
|
- ".gitignore"
|
378
373
|
- ".optic/.gitignore"
|
@@ -407,6 +402,7 @@ files:
|
|
407
402
|
- db/ddl_statements/latest_pact_consumer_version_orders.rb
|
408
403
|
- db/ddl_statements/latest_pact_publications_by_consumer_versions.rb
|
409
404
|
- db/ddl_statements/latest_tagged_pact_consumer_version_orders.rb
|
405
|
+
- db/ddl_statements/latest_tagged_pact_publications.rb
|
410
406
|
- db/ddl_statements/latest_triggered_webhooks.rb
|
411
407
|
- db/ddl_statements/latest_verification_ids_for_consumer_and_provider.rb
|
412
408
|
- db/ddl_statements/latest_verification_ids_for_consumer_version_tags.rb
|
@@ -532,6 +528,13 @@ files:
|
|
532
528
|
- db/migrations/20201026_update_latest_verification_ids_for_consumer_and_provider.rb
|
533
529
|
- db/migrations/20210115_add_webhook_foreign_key_indexes.rb
|
534
530
|
- db/migrations/20210116_add_context_to_triggered_webhook.rb
|
531
|
+
- db/migrations/20210117_add_branch_to_version.rb
|
532
|
+
- db/migrations/20210202_add_created_at_to_head_pact_tags.rb
|
533
|
+
- db/migrations/20210205_add_pacticipant_id_to_tag.rb
|
534
|
+
- db/migrations/20210206_add_index_to_tags_and_versions.rb
|
535
|
+
- db/migrations/20210207_optimise_latest_verification_ids_for_consumer_version_tags.rb
|
536
|
+
- db/migrations/20210208_optimise_latest_tagged_pact_cv_orders.rb
|
537
|
+
- db/migrations/20210210_create_environments_table.rb
|
535
538
|
- db/migrations/migration_helper.rb
|
536
539
|
- db/test/backwards_compatibility/.rspec
|
537
540
|
- db/test/backwards_compatibility/Appraisals
|
@@ -594,6 +597,7 @@ files:
|
|
594
597
|
- lib/pact_broker/api/contracts/base_contract.rb
|
595
598
|
- lib/pact_broker/api/contracts/dry_validation_predicates.rb
|
596
599
|
- lib/pact_broker/api/contracts/dry_validation_workarounds.rb
|
600
|
+
- lib/pact_broker/api/contracts/environment_schema.rb
|
597
601
|
- lib/pact_broker/api/contracts/pacticipant_name_contract.rb
|
598
602
|
- lib/pact_broker/api/contracts/pacticipant_name_validation.rb
|
599
603
|
- lib/pact_broker/api/contracts/put_pact_params_contract.rb
|
@@ -613,6 +617,8 @@ files:
|
|
613
617
|
- lib/pact_broker/api/decorators/embedded_label_decorator.rb
|
614
618
|
- lib/pact_broker/api/decorators/embedded_tag_decorator.rb
|
615
619
|
- lib/pact_broker/api/decorators/embedded_version_decorator.rb
|
620
|
+
- lib/pact_broker/api/decorators/environment_decorator.rb
|
621
|
+
- lib/pact_broker/api/decorators/environments_decorator.rb
|
616
622
|
- lib/pact_broker/api/decorators/extended_pact_decorator.rb
|
617
623
|
- lib/pact_broker/api/decorators/extended_verification_decorator.rb
|
618
624
|
- lib/pact_broker/api/decorators/format_date_time.rb
|
@@ -667,6 +673,8 @@ files:
|
|
667
673
|
- lib/pact_broker/api/resources/clean.rb
|
668
674
|
- lib/pact_broker/api/resources/dashboard.rb
|
669
675
|
- lib/pact_broker/api/resources/default_base_resource.rb
|
676
|
+
- lib/pact_broker/api/resources/environment.rb
|
677
|
+
- lib/pact_broker/api/resources/environments.rb
|
670
678
|
- lib/pact_broker/api/resources/error_handler.rb
|
671
679
|
- lib/pact_broker/api/resources/error_response_body_generator.rb
|
672
680
|
- lib/pact_broker/api/resources/error_test.rb
|
@@ -681,6 +689,7 @@ files:
|
|
681
689
|
- lib/pact_broker/api/resources/latest_verification_for_latest_pact.rb
|
682
690
|
- lib/pact_broker/api/resources/latest_verification_for_pact.rb
|
683
691
|
- lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb
|
692
|
+
- lib/pact_broker/api/resources/latest_version.rb
|
684
693
|
- lib/pact_broker/api/resources/matrix.rb
|
685
694
|
- lib/pact_broker/api/resources/matrix_badge.rb
|
686
695
|
- lib/pact_broker/api/resources/matrix_for_consumer_and_provider.rb
|
@@ -725,6 +734,7 @@ files:
|
|
725
734
|
- lib/pact_broker/config/repository.rb
|
726
735
|
- lib/pact_broker/config/save.rb
|
727
736
|
- lib/pact_broker/config/setting.rb
|
737
|
+
- lib/pact_broker/config/space_delimited_integer_list.rb
|
728
738
|
- lib/pact_broker/config/space_delimited_string_list.rb
|
729
739
|
- lib/pact_broker/configuration.rb
|
730
740
|
- lib/pact_broker/constants.rb
|
@@ -739,6 +749,7 @@ files:
|
|
739
749
|
- lib/pact_broker/db/data_migrations/set_consumer_ids_for_pact_publications.rb
|
740
750
|
- lib/pact_broker/db/data_migrations/set_created_at_for_latest_pact_publications.rb
|
741
751
|
- lib/pact_broker/db/data_migrations/set_created_at_for_latest_verifications.rb
|
752
|
+
- lib/pact_broker/db/data_migrations/set_extra_columns_for_tags.rb
|
742
753
|
- lib/pact_broker/db/data_migrations/set_latest_version_sequence_value.rb
|
743
754
|
- lib/pact_broker/db/data_migrations/set_pacticipant_ids_for_verifications.rb
|
744
755
|
- lib/pact_broker/db/data_migrations/set_webhooks_enabled.rb
|
@@ -754,6 +765,8 @@ files:
|
|
754
765
|
- lib/pact_broker/db/table_dependency_calculator.rb
|
755
766
|
- lib/pact_broker/db/validate_encoding.rb
|
756
767
|
- lib/pact_broker/db/version.rb
|
768
|
+
- lib/pact_broker/deployments/environment.rb
|
769
|
+
- lib/pact_broker/deployments/environment_service.rb
|
757
770
|
- lib/pact_broker/diagnostic/app.rb
|
758
771
|
- lib/pact_broker/diagnostic/resources/base_resource.rb
|
759
772
|
- lib/pact_broker/diagnostic/resources/dependencies.rb
|
@@ -762,12 +775,15 @@ files:
|
|
762
775
|
- lib/pact_broker/doc/views/can-i-deploy.markdown
|
763
776
|
- lib/pact_broker/doc/views/consumer-version.markdown
|
764
777
|
- lib/pact_broker/doc/views/consumer.markdown
|
778
|
+
- lib/pact_broker/doc/views/index/environment.markdown
|
779
|
+
- lib/pact_broker/doc/views/index/environments.markdown
|
765
780
|
- lib/pact_broker/doc/views/index/latest-pact-versions.markdown
|
766
781
|
- lib/pact_broker/doc/views/index/latest-provider-pacts-with-tag.markdown
|
767
782
|
- lib/pact_broker/doc/views/index/latest-provider-pacts.markdown
|
768
783
|
- lib/pact_broker/doc/views/index/latest-tagged-version.markdown
|
769
784
|
- lib/pact_broker/doc/views/index/latest-version.markdown
|
770
785
|
- lib/pact_broker/doc/views/index/pacticipant-version-tag.markdown
|
786
|
+
- lib/pact_broker/doc/views/index/pacticipant-version.markdown
|
771
787
|
- lib/pact_broker/doc/views/index/pacticipants.markdown
|
772
788
|
- lib/pact_broker/doc/views/index/provider-pacts-with-tag.markdown
|
773
789
|
- lib/pact_broker/doc/views/index/provider-pacts.markdown
|
@@ -854,6 +870,7 @@ files:
|
|
854
870
|
- lib/pact_broker/pacts/content.rb
|
855
871
|
- lib/pact_broker/pacts/create_formatted_diff.rb
|
856
872
|
- lib/pact_broker/pacts/diff.rb
|
873
|
+
- lib/pact_broker/pacts/eager_loaders.rb
|
857
874
|
- lib/pact_broker/pacts/generate_interaction_sha.rb
|
858
875
|
- lib/pact_broker/pacts/generate_sha.rb
|
859
876
|
- lib/pact_broker/pacts/head_pact.rb
|
@@ -861,12 +878,15 @@ files:
|
|
861
878
|
- lib/pact_broker/pacts/latest_pact_publications.rb
|
862
879
|
- lib/pact_broker/pacts/latest_pact_publications_by_consumer_version.rb
|
863
880
|
- lib/pact_broker/pacts/latest_tagged_pact_publications.rb
|
881
|
+
- lib/pact_broker/pacts/lazy_loaders.rb
|
864
882
|
- lib/pact_broker/pacts/merger.rb
|
865
883
|
- lib/pact_broker/pacts/metadata.rb
|
866
884
|
- lib/pact_broker/pacts/order_hash_keys.rb
|
867
885
|
- lib/pact_broker/pacts/pact_params.rb
|
868
886
|
- lib/pact_broker/pacts/pact_publication.rb
|
887
|
+
- lib/pact_broker/pacts/pact_publication_dataset_module.rb
|
869
888
|
- lib/pact_broker/pacts/pact_version.rb
|
889
|
+
- lib/pact_broker/pacts/pacts_for_verification_repository.rb
|
870
890
|
- lib/pact_broker/pacts/parse.rb
|
871
891
|
- lib/pact_broker/pacts/placeholder_pact.rb
|
872
892
|
- lib/pact_broker/pacts/repository.rb
|
@@ -885,6 +905,7 @@ files:
|
|
885
905
|
- lib/pact_broker/repositories/helpers.rb
|
886
906
|
- lib/pact_broker/services.rb
|
887
907
|
- lib/pact_broker/string_refinements.rb
|
908
|
+
- lib/pact_broker/tags/eager_loaders.rb
|
888
909
|
- lib/pact_broker/tags/head_pact_tags.rb
|
889
910
|
- lib/pact_broker/tags/repository.rb
|
890
911
|
- lib/pact_broker/tags/service.rb
|
@@ -937,7 +958,9 @@ files:
|
|
937
958
|
- lib/pact_broker/verifications/summary_for_consumer_version.rb
|
938
959
|
- lib/pact_broker/version.rb
|
939
960
|
- lib/pact_broker/versions/abbreviate_number.rb
|
961
|
+
- lib/pact_broker/versions/eager_loaders.rb
|
940
962
|
- lib/pact_broker/versions/latest_version.rb
|
963
|
+
- lib/pact_broker/versions/lazy_loaders.rb
|
941
964
|
- lib/pact_broker/versions/parse_semantic_version.rb
|
942
965
|
- lib/pact_broker/versions/repository.rb
|
943
966
|
- lib/pact_broker/versions/sequence.rb
|
@@ -1055,9 +1078,13 @@ files:
|
|
1055
1078
|
- public/stylesheets/pact.css
|
1056
1079
|
- regression/.gitignore
|
1057
1080
|
- regression/can_i_deploy_spec.rb
|
1081
|
+
- regression/index_spec.rb
|
1058
1082
|
- regression/regression_helper.rb
|
1059
1083
|
- regression/script/approval-all.sh
|
1084
|
+
- regression/script/clear.sh
|
1085
|
+
- regression/script/run.sh
|
1060
1086
|
- script/db-spec.sh
|
1087
|
+
- script/demonstrate-version-branches.rb
|
1061
1088
|
- script/docker-container/test.sh
|
1062
1089
|
- script/docker/db-execute-sql-file.sh
|
1063
1090
|
- script/docker/db-psql.sh
|
@@ -1106,8 +1133,12 @@ files:
|
|
1106
1133
|
- script/webhook-server.ru
|
1107
1134
|
- spec/features/base_equality_only_on_content_that_affects_verification_results_spec.rb
|
1108
1135
|
- spec/features/can_i_deploy_spec.rb
|
1136
|
+
- spec/features/create_environment_spec.rb
|
1109
1137
|
- spec/features/create_pacticipant_spec.rb
|
1138
|
+
- spec/features/create_tag_spec.rb
|
1139
|
+
- spec/features/create_version_spec.rb
|
1110
1140
|
- spec/features/create_webhook_spec.rb
|
1141
|
+
- spec/features/delete_environment_spec.rb
|
1111
1142
|
- spec/features/delete_integration_spec.rb
|
1112
1143
|
- spec/features/delete_label_spec.rb
|
1113
1144
|
- spec/features/delete_pact_spec.rb
|
@@ -1117,11 +1148,14 @@ files:
|
|
1117
1148
|
- spec/features/delete_version_spec.rb
|
1118
1149
|
- spec/features/delete_webhook_spec.rb
|
1119
1150
|
- spec/features/edit_webhook_spec.rb
|
1151
|
+
- spec/features/end_deployment_spec.rb
|
1120
1152
|
- spec/features/execute_unsaved_webhook_spec.rb
|
1121
1153
|
- spec/features/execute_webhook_spec.rb
|
1122
1154
|
- spec/features/get_can_i_deploy_badge_spec.rb
|
1123
1155
|
- spec/features/get_dashboard_spec.rb
|
1124
1156
|
- spec/features/get_diff_spec.rb
|
1157
|
+
- spec/features/get_environment_spec.rb
|
1158
|
+
- spec/features/get_environments_spec.rb
|
1125
1159
|
- spec/features/get_integrations_dot_file_spec.rb
|
1126
1160
|
- spec/features/get_integrations_spec.rb
|
1127
1161
|
- spec/features/get_label_spec.rb
|
@@ -1154,7 +1188,9 @@ files:
|
|
1154
1188
|
- spec/features/publish_not_a_pact_spec.rb
|
1155
1189
|
- spec/features/publish_pact_spec.rb
|
1156
1190
|
- spec/features/publish_verification_spec.rb
|
1191
|
+
- spec/features/record_deployment_spec.rb
|
1157
1192
|
- spec/features/tag_version_spec.rb
|
1193
|
+
- spec/features/update_environment_spec.rb
|
1158
1194
|
- spec/features/update_matrix_spec.rb
|
1159
1195
|
- spec/features/update_pacticipant_spec.rb
|
1160
1196
|
- spec/features/update_webhook_spec.rb
|
@@ -1191,6 +1227,7 @@ files:
|
|
1191
1227
|
- spec/lib/pact/doc/interaction_view_model_spec.rb
|
1192
1228
|
- spec/lib/pact/doc/markdown/consumer_contract_renderer_spec.rb
|
1193
1229
|
- spec/lib/pact/doc/markdown/index_renderer_spec.rb
|
1230
|
+
- spec/lib/pact_broker/api/contracts/environment_schema_spec.rb
|
1194
1231
|
- spec/lib/pact_broker/api/contracts/put_pact_params_contract_spec.rb
|
1195
1232
|
- spec/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema_spec.rb
|
1196
1233
|
- spec/lib/pact_broker/api/contracts/verifiable_pacts_query_schema_spec.rb
|
@@ -1261,6 +1298,7 @@ files:
|
|
1261
1298
|
- spec/lib/pact_broker/api/resources/verification_spec.rb
|
1262
1299
|
- spec/lib/pact_broker/api/resources/verification_triggered_webhooks_spec.rb
|
1263
1300
|
- spec/lib/pact_broker/api/resources/verifications_spec.rb
|
1301
|
+
- spec/lib/pact_broker/api/resources/webhook_execution_result_spec.rb
|
1264
1302
|
- spec/lib/pact_broker/api/resources/webhook_execution_spec.rb
|
1265
1303
|
- spec/lib/pact_broker/api/resources/webhook_spec.rb
|
1266
1304
|
- spec/lib/pact_broker/api/resources/webhooks_spec.rb
|
@@ -1271,6 +1309,7 @@ files:
|
|
1271
1309
|
- spec/lib/pact_broker/config/load_spec.rb
|
1272
1310
|
- spec/lib/pact_broker/config/save_and_load_spec.rb
|
1273
1311
|
- spec/lib/pact_broker/config/save_spec.rb
|
1312
|
+
- spec/lib/pact_broker/config/space_delimited_integer_list_spec.rb
|
1274
1313
|
- spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
|
1275
1314
|
- spec/lib/pact_broker/configuration_spec.rb
|
1276
1315
|
- spec/lib/pact_broker/db/clean_incremental_spec.rb
|
@@ -1333,10 +1372,12 @@ files:
|
|
1333
1372
|
- spec/lib/pact_broker/pacts/merger_spec.rb
|
1334
1373
|
- spec/lib/pact_broker/pacts/metadata_spec.rb
|
1335
1374
|
- spec/lib/pact_broker/pacts/pact_params_spec.rb
|
1375
|
+
- spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb
|
1336
1376
|
- spec/lib/pact_broker/pacts/pact_publication_spec.rb
|
1337
1377
|
- spec/lib/pact_broker/pacts/pact_version_spec.rb
|
1338
1378
|
- spec/lib/pact_broker/pacts/repository_find_for_verification_fallback_spec.rb
|
1339
1379
|
- spec/lib/pact_broker/pacts/repository_find_for_verification_spec.rb
|
1380
|
+
- spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_branch_spec.rb
|
1340
1381
|
- spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_spec.rb
|
1341
1382
|
- spec/lib/pact_broker/pacts/repository_spec.rb
|
1342
1383
|
- spec/lib/pact_broker/pacts/selected_pact_spec.rb
|
@@ -1384,6 +1425,7 @@ files:
|
|
1384
1425
|
- spec/lib/rack/pact_broker/database_transaction_spec.rb
|
1385
1426
|
- spec/lib/rack/pact_broker/invalid_uri_protection_spec.rb
|
1386
1427
|
- spec/lib/rack/pact_broker/request_target_spec.rb
|
1428
|
+
- spec/lib/rack/pact_broker/set_base_url_spec.rb
|
1387
1429
|
- spec/lib/rack/pact_broker/use_when_spec.rb
|
1388
1430
|
- spec/lib/sequel/plugins/insert_ignore_spec.rb
|
1389
1431
|
- spec/lib/sequel/plugins/upsert_spec.rb
|
@@ -1404,6 +1446,7 @@ files:
|
|
1404
1446
|
- spec/service_consumers/provider_states_for_pact_broker_client.rb
|
1405
1447
|
- spec/service_consumers/provider_states_for_pact_ruby.rb
|
1406
1448
|
- spec/spec_helper.rb
|
1449
|
+
- spec/support/approvals.rb
|
1407
1450
|
- spec/support/database.rb
|
1408
1451
|
- spec/support/database_cleaner.rb
|
1409
1452
|
- spec/support/fixture_helpers.rb
|
@@ -1501,15 +1544,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1501
1544
|
- !ruby/object:Gem::Version
|
1502
1545
|
version: '0'
|
1503
1546
|
requirements: []
|
1504
|
-
rubygems_version: 3.2.
|
1547
|
+
rubygems_version: 3.2.15
|
1505
1548
|
signing_key:
|
1506
1549
|
specification_version: 4
|
1507
1550
|
summary: See description
|
1508
1551
|
test_files:
|
1509
1552
|
- spec/features/base_equality_only_on_content_that_affects_verification_results_spec.rb
|
1510
1553
|
- spec/features/can_i_deploy_spec.rb
|
1554
|
+
- spec/features/create_environment_spec.rb
|
1511
1555
|
- spec/features/create_pacticipant_spec.rb
|
1556
|
+
- spec/features/create_tag_spec.rb
|
1557
|
+
- spec/features/create_version_spec.rb
|
1512
1558
|
- spec/features/create_webhook_spec.rb
|
1559
|
+
- spec/features/delete_environment_spec.rb
|
1513
1560
|
- spec/features/delete_integration_spec.rb
|
1514
1561
|
- spec/features/delete_label_spec.rb
|
1515
1562
|
- spec/features/delete_pact_spec.rb
|
@@ -1519,11 +1566,14 @@ test_files:
|
|
1519
1566
|
- spec/features/delete_version_spec.rb
|
1520
1567
|
- spec/features/delete_webhook_spec.rb
|
1521
1568
|
- spec/features/edit_webhook_spec.rb
|
1569
|
+
- spec/features/end_deployment_spec.rb
|
1522
1570
|
- spec/features/execute_unsaved_webhook_spec.rb
|
1523
1571
|
- spec/features/execute_webhook_spec.rb
|
1524
1572
|
- spec/features/get_can_i_deploy_badge_spec.rb
|
1525
1573
|
- spec/features/get_dashboard_spec.rb
|
1526
1574
|
- spec/features/get_diff_spec.rb
|
1575
|
+
- spec/features/get_environment_spec.rb
|
1576
|
+
- spec/features/get_environments_spec.rb
|
1527
1577
|
- spec/features/get_integrations_dot_file_spec.rb
|
1528
1578
|
- spec/features/get_integrations_spec.rb
|
1529
1579
|
- spec/features/get_label_spec.rb
|
@@ -1556,7 +1606,9 @@ test_files:
|
|
1556
1606
|
- spec/features/publish_not_a_pact_spec.rb
|
1557
1607
|
- spec/features/publish_pact_spec.rb
|
1558
1608
|
- spec/features/publish_verification_spec.rb
|
1609
|
+
- spec/features/record_deployment_spec.rb
|
1559
1610
|
- spec/features/tag_version_spec.rb
|
1611
|
+
- spec/features/update_environment_spec.rb
|
1560
1612
|
- spec/features/update_matrix_spec.rb
|
1561
1613
|
- spec/features/update_pacticipant_spec.rb
|
1562
1614
|
- spec/features/update_webhook_spec.rb
|
@@ -1593,6 +1645,7 @@ test_files:
|
|
1593
1645
|
- spec/lib/pact/doc/interaction_view_model_spec.rb
|
1594
1646
|
- spec/lib/pact/doc/markdown/consumer_contract_renderer_spec.rb
|
1595
1647
|
- spec/lib/pact/doc/markdown/index_renderer_spec.rb
|
1648
|
+
- spec/lib/pact_broker/api/contracts/environment_schema_spec.rb
|
1596
1649
|
- spec/lib/pact_broker/api/contracts/put_pact_params_contract_spec.rb
|
1597
1650
|
- spec/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema_spec.rb
|
1598
1651
|
- spec/lib/pact_broker/api/contracts/verifiable_pacts_query_schema_spec.rb
|
@@ -1663,6 +1716,7 @@ test_files:
|
|
1663
1716
|
- spec/lib/pact_broker/api/resources/verification_spec.rb
|
1664
1717
|
- spec/lib/pact_broker/api/resources/verification_triggered_webhooks_spec.rb
|
1665
1718
|
- spec/lib/pact_broker/api/resources/verifications_spec.rb
|
1719
|
+
- spec/lib/pact_broker/api/resources/webhook_execution_result_spec.rb
|
1666
1720
|
- spec/lib/pact_broker/api/resources/webhook_execution_spec.rb
|
1667
1721
|
- spec/lib/pact_broker/api/resources/webhook_spec.rb
|
1668
1722
|
- spec/lib/pact_broker/api/resources/webhooks_spec.rb
|
@@ -1673,6 +1727,7 @@ test_files:
|
|
1673
1727
|
- spec/lib/pact_broker/config/load_spec.rb
|
1674
1728
|
- spec/lib/pact_broker/config/save_and_load_spec.rb
|
1675
1729
|
- spec/lib/pact_broker/config/save_spec.rb
|
1730
|
+
- spec/lib/pact_broker/config/space_delimited_integer_list_spec.rb
|
1676
1731
|
- spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
|
1677
1732
|
- spec/lib/pact_broker/configuration_spec.rb
|
1678
1733
|
- spec/lib/pact_broker/db/clean_incremental_spec.rb
|
@@ -1735,10 +1790,12 @@ test_files:
|
|
1735
1790
|
- spec/lib/pact_broker/pacts/merger_spec.rb
|
1736
1791
|
- spec/lib/pact_broker/pacts/metadata_spec.rb
|
1737
1792
|
- spec/lib/pact_broker/pacts/pact_params_spec.rb
|
1793
|
+
- spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb
|
1738
1794
|
- spec/lib/pact_broker/pacts/pact_publication_spec.rb
|
1739
1795
|
- spec/lib/pact_broker/pacts/pact_version_spec.rb
|
1740
1796
|
- spec/lib/pact_broker/pacts/repository_find_for_verification_fallback_spec.rb
|
1741
1797
|
- spec/lib/pact_broker/pacts/repository_find_for_verification_spec.rb
|
1798
|
+
- spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_branch_spec.rb
|
1742
1799
|
- spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_spec.rb
|
1743
1800
|
- spec/lib/pact_broker/pacts/repository_spec.rb
|
1744
1801
|
- spec/lib/pact_broker/pacts/selected_pact_spec.rb
|
@@ -1786,6 +1843,7 @@ test_files:
|
|
1786
1843
|
- spec/lib/rack/pact_broker/database_transaction_spec.rb
|
1787
1844
|
- spec/lib/rack/pact_broker/invalid_uri_protection_spec.rb
|
1788
1845
|
- spec/lib/rack/pact_broker/request_target_spec.rb
|
1846
|
+
- spec/lib/rack/pact_broker/set_base_url_spec.rb
|
1789
1847
|
- spec/lib/rack/pact_broker/use_when_spec.rb
|
1790
1848
|
- spec/lib/sequel/plugins/insert_ignore_spec.rb
|
1791
1849
|
- spec/lib/sequel/plugins/upsert_spec.rb
|
@@ -1806,6 +1864,7 @@ test_files:
|
|
1806
1864
|
- spec/service_consumers/provider_states_for_pact_broker_client.rb
|
1807
1865
|
- spec/service_consumers/provider_states_for_pact_ruby.rb
|
1808
1866
|
- spec/spec_helper.rb
|
1867
|
+
- spec/support/approvals.rb
|
1809
1868
|
- spec/support/database.rb
|
1810
1869
|
- spec/support/database_cleaner.rb
|
1811
1870
|
- spec/support/fixture_helpers.rb
|