Sha256: 46033e4224839b4b5a29bda62f8756647c8bb5c89d2619935ff1718955ec4a3c

Contents?: true

Size: 1.14 KB

Versions: 83

Compression:

Stored size: 1.14 KB

Contents

describe "pact-broker can-i-deploy", skip_windows: true do
  before(:all) do
    @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")
    sleep 4
  end

  context "when the pacticipants can be deployed" do
    subject { `bundle exec bin/pact-broker can-i-deploy --pacticipant Foo --version 1.2.3 --pacticipant Bar --version 4.5.6 --broker-base-url http://localhost:5000` }

    it "returns a success exit code" do
      subject
      puts subject unless $?.exitstatus == 0
      expect($?.exitstatus).to eq 0
      expect(subject).to match /CONSUMER/
      expect(subject).to match /Foo/
      expect(subject).to match /PROVIDER/
      expect(subject).to match /Bar/
    end
  end

  context "when the pacticipants can't be deployed" do
    subject { `bundle exec bin/pact-broker can-i-deploy --pacticipant Wiffle --version 1.2.3 --pacticipant Meep --version 4.5.6 --broker-base-url http://localhost:5000` }

    it "returns an error exit code" do
      subject
      expect($?.exitstatus).to_not eq 0
    end
  end

  after(:all) do
    Process.kill 'KILL', @pipe.pid
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
pact_broker-client-1.28.0 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.28 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.27 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.26 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.25 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.24 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.23 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.22 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.21 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.20 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.19 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.14 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.13 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.12 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.11 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.10 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.9 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.8 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.4 spec/integration/can_i_deploy_spec.rb
pact_broker-client-1.27.2 spec/integration/can_i_deploy_spec.rb