Skip to content

Commit

Permalink
Stub request that's not captured by a VCR (#7306)
Browse files Browse the repository at this point in the history
Stubs out a registry request that's not captured by a VCR. The test fails when the VCR mode is set to `:none` as part of #4822

See https://github.com/dependabot/dependabot-core/actions/runs/4957979462/jobs/8870303817?pr=4822#step:5:223 for the error
  • Loading branch information
Nishnha committed Jul 15, 2023
1 parent 7fbd771 commit 65f1c2d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions terraform/spec/dependabot/terraform/file_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,13 @@
end

context "with a private module proxy that can't be reached", vcr: true do
before do
artifactory_repo_url = "http://artifactory.dependabot.com/artifactory/tf-modules/azurerm"

stub_request(:get, "#{artifactory_repo_url}/terraform-azurerm-nsg-rules.v1.1.0.tar.gz?terraform-get=1").
and_return(status: 401)
end

let(:files) { project_dependency_files("private_module_proxy") }

it "raises an error" do
Expand Down

0 comments on commit 65f1c2d

Please sign in to comment.