Sha256: c740755ba2445d127158ecbe768240881e9611b8355d8a6c3acf299dfb3f9f8d

Contents?: true

Size: 1.08 KB

Versions: 16

Compression:

Stored size: 1.08 KB

Contents

#
# RPC style seems cleaner than REST here, as setting the endedAt parameter directly
# seems likely to end in Timezone tears
# This endpoint would be called by the pact broker client during `record-deployment` if the
# --end-previous-deployment (on by default) was specified.
# This allows us to know exactly what is deployed to a particular environment at a given time,
# (eg. /environments/test/deployments/current)
# and provides first class support for mobile clients that have multiple versions in prod
# at once.

describe "Record deployment ended", skip: "Not yet implemented" do
  before do
    td.create_environment("test")
      .create_pacticipant("Foo")
      .create_pacticipant_version("1")
      .create_deployment("test")
  end
  let(:path) { "/pacticipants/Foo/deployments/test/latest/end" }
  let(:headers) { {} }
  let(:response_body) { JSON.parse(last_response.body, symbolize_names: true) }

  subject { post(path, nil, headers) }

  it { is_expected.be_a_hal_json_success_response }

  it "returns the updated deployment" do
    expect(subject[:endedAt]).to_not be nil
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
pact_broker-2.89.1 spec/features/end_deployment_spec.rb
pact_broker-2.89.0 spec/features/end_deployment_spec.rb
pact_broker-2.88.0 spec/features/end_deployment_spec.rb
pact_broker-2.87.0 spec/features/end_deployment_spec.rb
pact_broker-2.86.0 spec/features/end_deployment_spec.rb
pact_broker-2.85.1 spec/features/end_deployment_spec.rb
pact_broker-2.85.0 spec/features/end_deployment_spec.rb
pact_broker-2.84.0 spec/features/end_deployment_spec.rb
pact_broker-2.83.0 spec/features/end_deployment_spec.rb
pact_broker-2.82.0 spec/features/end_deployment_spec.rb
pact_broker-2.81.0 spec/features/end_deployment_spec.rb
pact_broker-2.80.0 spec/features/end_deployment_spec.rb
pact_broker-2.79.1 spec/features/end_deployment_spec.rb
pact_broker-2.79.0 spec/features/end_deployment_spec.rb
pact_broker-2.78.1 spec/features/end_deployment_spec.rb
pact_broker-2.78.0 spec/features/end_deployment_spec.rb