diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-08-10 17:23:32 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-08-16 15:03:38 +0900 |
commit | e678affe70d7597464368197fb55d277f0c26bab (patch) | |
tree | 9638ed776bc334656583b9990f21aed436b2d70f /spec | |
parent | c076ac8a5f5cc2850ac59bc2239354c33fc05961 (diff) |
[rubygems/rubygems] Bad auth should not fallback either
https://github.com/rubygems/rubygems/commit/ba3ea27869
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/install/gems/compact_index_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb index f0717de36d..1d193a0f20 100644 --- a/spec/bundler/install/gems/compact_index_spec.rb +++ b/spec/bundler/install/gems/compact_index_spec.rb @@ -683,6 +683,15 @@ The checksum of /versions does not match the checksum provided by the server! So bundle :install, :artifice => "compact_index_strict_basic_authentication", :raise_on_error => false expect(err).to include("Bad username or password") end + + it "does not fallback to old dependency API if bad authentication is provided" do + bundle "config set #{source_hostname} #{user}:wrong" + + bundle :install, :artifice => "compact_index_strict_basic_authentication", :raise_on_error => false, :verbose => true + expect(err).to include("Bad username or password") + expect(out).to include("HTTP 401 Unauthorized http://user@localgemserver.test/versions") + expect(out).not_to include("HTTP 401 Unauthorized http://user@localgemserver.test/api/v1/dependencies") + end end describe "with no password" do |