Sha256: 89dbdaa933134b5bde4050743aacf30607584b0dca80f395b44bd6a5380f91fc

Contents?: true

Size: 1.68 KB

Versions: 12

Compression:

Stored size: 1.68 KB

Contents

#!/usr/bin/env ruby
begin

  $LOAD_PATH << "#{Dir.pwd}/lib"
  require "pact_broker/test/http_test_data_builder"
  base_url = ENV["PACT_BROKER_BASE_URL"] || "http://localhost:9292"

  td = PactBroker::Test::HttpTestDataBuilder.new(base_url)
  td.delete_integration(consumer: "Foo", provider: "Bar")
    .delete_integration(consumer: "foo-consumer", provider: "bar-provider")
    .create_environment(name: "test")
    .create_environment(name: "prod", production: true)
    .publish_pact(consumer: "foo-consumer", consumer_version: "1", provider: "bar-provider", content_id: "111", tag: "main")
    .get_pacts_for_verification(
      enable_pending: true,
      provider_version_tag: "main",
      include_wip_pacts_since: "2020-01-01",
      consumer_version_selectors: [{ tag: "main", latest: true }])
    .verify_pact(
      index: 0,
      provider_version_tag: "main",
      provider_version: "1",
      success: true
    )
    .record_deployment(pacticipant: "bar-provider", version: "1", environment_name: "test")
    .record_deployment(pacticipant: "bar-provider", version: "1", environment_name: "prod")
    .record_release(pacticipant: "foo-consumer", version: "1", environment_name: "prod")
    .get_pacts_for_verification(
      enable_pending: true,
      provider_version_tag: "main",
      include_wip_pacts_since: "2020-01-01",
      consumer_version_selectors: [{ tag: "main", latest: true }])
    .verify_pact(
      index: 0,
      provider_version_tag: "main",
      provider_version: "2",
      success: true
    )
    .record_deployment(pacticipant: "bar-provider", version: "2", environment_name: "test")

rescue StandardError => e
  puts "#{e.class} #{e.message}"
  puts e.backtrace
  exit 1
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pact_broker-2.89.1 script/data/environments.rb
pact_broker-2.89.0 script/data/environments.rb
pact_broker-2.88.0 script/data/environments.rb
pact_broker-2.87.0 script/data/environments.rb
pact_broker-2.86.0 script/data/environments.rb
pact_broker-2.85.1 script/data/environments.rb
pact_broker-2.85.0 script/data/environments.rb
pact_broker-2.84.0 script/data/environments.rb
pact_broker-2.83.0 script/data/environments.rb
pact_broker-2.82.0 script/data/environments.rb
pact_broker-2.81.0 script/data/environments.rb
pact_broker-2.80.0 script/data/environments.rb