Skip to content

(CONT-1241) - Retrying when response body is nil or empty but response code is 200 #79

(CONT-1241) - Retrying when response body is nil or empty but response code is 200

(CONT-1241) - Retrying when response body is nil or empty but response code is 200 #79

Triggered via pull request July 24, 2023 11:18
Status Failure
Total duration 46s
Artifacts

ci.yml

on: pull_request
Matrix: spec
Fit to window
Zoom out
Zoom in

Annotations

6 errors and 8 warnings
spec (ruby 3.2) / spec: spec/tasks/provision_service_spec.rb#L81
ProvisionService #provision when response is empty return exception Failure/Error: expect { provision_service.provision(platform, inventory_location, vars, retry_attempts) }.to raise_error(NoMethodError) expected NoMethodError, got #<WebMock::NetConnectNotAllowedError:"Real HTTP connections are disabled. Unregistered request: POST ...-iis/actions/runs/5575363758\"]]\n\n\n============================================================"> with backtrace: # ./tasks/provision_service.rb:73:in `block in invoke_cloud_request' # /opt/hostedtoolcache/Ruby/3.2.2/x64/lib/ruby/3.2.0/net/http.rb:687:in `start' # ./tasks/provision_service.rb:72:in `invoke_cloud_request' # ./tasks/provision_service.rb:110:in `provision' # ./spec/tasks/provision_service_spec.rb:94:in `block (5 levels) in <top (required)>' # ./spec/tasks/provision_service_spec.rb:94:in `block (4 levels) in <top (required)>'
spec (ruby 3.2) / spec: spec/tasks/provision_service_spec.rb#L99
ProvisionService #provision when response is avlid return valid response Failure/Error: expect(provision_service.provision(platform, inventory_location, vars, retry_attempts)[:status]).to eq('ok') WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled. Unregistered request: POST https://facade-release-6f3kfepqcq-ew.a.run.app/v1/provision with body '{"url":"https://api.github.com/repos/puppetlabs/provision/actions/runs/5644187455","VMs":[{"cloud":null,"region":null,"zone":null,"images":["centos-8"]}]}' with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'Host'=>'facade-release-6f3kfepqcq-ew.a.run.app', 'User-Agent'=>'Ruby'} You can stub this request with the following snippet: stub_request(:post, "https://facade-release-6f3kfepqcq-ew.a.run.app/v1/provision"). with( body: "{\"url\":\"https://api.github.com/repos/puppetlabs/provision/actions/runs/5644187455\",\"VMs\":[{\"cloud\":null,\"region\":null,\"zone\":null,\"images\":[\"centos-8\"]}]}", headers: { 'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'Host'=>'facade-release-6f3kfepqcq-ew.a.run.app', 'User-Agent'=>'Ruby' }). to_return(status: 200, body: "", headers: {}) registered request stubs: stub_request(:post, "https://facade-release-6f3kfepqcq-ew.a.run.app/v1/provision"). with( body: "{\"url\":\"https://api.github.com/repos/puppetlabs/puppetlabs-iis/actions/runs/5575363758\",\"VMs\":[{\"cloud\":null,\"region\":null,\"zone\":null,\"images\":[\"centos-8\"]}]}", headers: { 'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'Host'=>'facade-release-6f3kfepqcq-ew.a.run.app', 'User-Agent'=>'Ruby' }) Body diff: [["~", "url", "https://api.github.com/repos/puppetlabs/provision/actions/runs/5644187455", "https://api.github.com/repos/puppetlabs/puppetlabs-iis/actions/runs/5575363758"]] ============================================================
spec (ruby 3.2) / spec
Process completed with exit code 1.
spec (ruby 2.7) / spec: spec/tasks/provision_service_spec.rb#L81
ProvisionService #provision when response is empty return exception Failure/Error: expect { provision_service.provision(platform, inventory_location, vars, retry_attempts) }.to raise_error(NoMethodError) expected NoMethodError, got #<WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled. Unregistered request: POST ...tlabs-iis/actions/runs/5575363758"]] ============================================================> with backtrace: # ./tasks/provision_service.rb:73:in `block in invoke_cloud_request' # /opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/net/http.rb:606:in `start' # ./tasks/provision_service.rb:72:in `invoke_cloud_request' # ./tasks/provision_service.rb:110:in `provision' # ./spec/tasks/provision_service_spec.rb:94:in `block (5 levels) in <top (required)>' # ./spec/tasks/provision_service_spec.rb:94:in `block (4 levels) in <top (required)>'
spec (ruby 2.7) / spec: spec/tasks/provision_service_spec.rb#L99
ProvisionService #provision when response is avlid return valid response Failure/Error: expect(provision_service.provision(platform, inventory_location, vars, retry_attempts)[:status]).to eq('ok') WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled. Unregistered request: POST https://facade-release-6f3kfepqcq-ew.a.run.app/v1/provision with body '{"url":"https://api.github.com/repos/puppetlabs/provision/actions/runs/5644187455","VMs":[{"cloud":null,"region":null,"zone":null,"images":["centos-8"]}]}' with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'Host'=>'facade-release-6f3kfepqcq-ew.a.run.app', 'User-Agent'=>'Ruby'} You can stub this request with the following snippet: stub_request(:post, "https://facade-release-6f3kfepqcq-ew.a.run.app/v1/provision"). with( body: "{\"url\":\"https://api.github.com/repos/puppetlabs/provision/actions/runs/5644187455\",\"VMs\":[{\"cloud\":null,\"region\":null,\"zone\":null,\"images\":[\"centos-8\"]}]}", headers: { 'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'Host'=>'facade-release-6f3kfepqcq-ew.a.run.app', 'User-Agent'=>'Ruby' }). to_return(status: 200, body: "", headers: {}) registered request stubs: stub_request(:post, "https://facade-release-6f3kfepqcq-ew.a.run.app/v1/provision"). with( body: "{\"url\":\"https://api.github.com/repos/puppetlabs/puppetlabs-iis/actions/runs/5575363758\",\"VMs\":[{\"cloud\":null,\"region\":null,\"zone\":null,\"images\":[\"centos-8\"]}]}", headers: { 'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'Host'=>'facade-release-6f3kfepqcq-ew.a.run.app', 'User-Agent'=>'Ruby' }) Body diff: [["~", "url", "https://api.github.com/repos/puppetlabs/provision/actions/runs/5644187455", "https://api.github.com/repos/puppetlabs/puppetlabs-iis/actions/runs/5575363758"]] ============================================================
spec (ruby 2.7) / spec
Process completed with exit code 1.
spec (ruby 3.2) / spec: spec/tasks/abs_spec.rb#L70
provision::abs .run raises an error when node_name not given for tear_down Skipped: Not yet implemented
spec (ruby 3.2) / spec: spec/tasks/abs_spec.rb#L71
provision::abs .run raises an error if both node_name and platform are given Skipped: Not yet implemented
spec (ruby 3.2) / spec: spec/tasks/abs_spec.rb#L121
provision::abs when provisioning raises an error if abs returns error response Skipped: Not yet implemented
spec (ruby 3.2) / spec: spec/tasks/abs_spec.rb#L169
provision::abs when tearing down raises an error if abs returns error response Skipped: Not yet implemented
spec (ruby 2.7) / spec: spec/tasks/abs_spec.rb#L70
provision::abs .run raises an error when node_name not given for tear_down Skipped: Not yet implemented
spec (ruby 2.7) / spec: spec/tasks/abs_spec.rb#L71
provision::abs .run raises an error if both node_name and platform are given Skipped: Not yet implemented
spec (ruby 2.7) / spec: spec/tasks/abs_spec.rb#L121
provision::abs when provisioning raises an error if abs returns error response Skipped: Not yet implemented
spec (ruby 2.7) / spec: spec/tasks/abs_spec.rb#L169
provision::abs when tearing down raises an error if abs returns error response Skipped: Not yet implemented