[DRE-maint] Bug#999726: ruby-omniauth-shibboleth: FTBFS with ruby-omniauth 2.0.x: ERROR: Test "ruby2.7" failed: Failure/Error: expect(last_response.status).to eq(302)

Mohd Bilal mdbilal at disroot.org
Mon May 9 20:44:01 BST 2022


On Mon, 15 Nov 2021 11:08:46 -0300 Antonio Terceiro 
<terceiro at debian.org> wrote:
> Source: ruby-omniauth-shibboleth
> Version: 1.3.0-1
> Severity: serious
> Justification: FTBFS
> Tags: bookworm sid ftbfs
> User: debian-ruby at lists.debian.org
> Usertags: ruby-omniauth-2.0
> 
> Hi,
> 
> I would like to upload ruby-omniauth 2.0.4 to unstable soon. During a test
> rebuild, ruby-omniauth-shibboleth was found to fail to build in that situation.
> 
> To reproduce this locally, you need to install ruby-omniauth from experimental
> on an unstable system or build chroot. I would expect a new upstream version to
> work against the latest ruby-omniauth just fine.
> 
> Relevant part (hopefully):
> >      Failure/Error: expect(last_response.status).to eq(302)
> > 
> >        expected: 302
> >             got: 200
> > 
> >        (compared using ==)
> >      # ./spec/omniauth/strategies/shibboleth_spec.rb:42:in `block (3 levels) in <top (required)>'
> > 
> > Finished in 0.06473 seconds (files took 0.14061 seconds to load)
> > 16 examples, 1 failure
> > 
> > Failed examples:
> > 
> > rspec ./spec/omniauth/strategies/shibboleth_spec.rb:41 # OmniAuth::Strategies::Shibboleth request phase is expected to redirect to callback_url
> > 
> > /usr/bin/ruby2.7 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.9.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.9.2/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.9.2/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation failed
> > ERROR: Test "ruby2.7" failed: 
> 
> 
Hello \o/,

I don't know much ruby but wanted to help fix this :) . Here's what I 
feel can be done in this case
 From 2.0 omniauth defaults to only POST as the allowed request_phase 
method[1]. So as per the test case[2] it is expected to redirect to a 
callback url. But from 2.0 only POST method is allowed. So shall I 
include a patch to change this test case so that it checks whether 
request status is not 302 which confirms that the get request isn't 
redirected which is the expected behaviour from 2.0

expect(last_response.status).not_to eq(302)

If this is ok. I can add a patch for this. If you feel there's any other 
workaround for this please suggest. The upstream hasn't been active and 
I dont think they'll have new version anytime soon

> The full build log is available at
> https://people.debian.org/~terceiro/rebuilds/ruby-omniauth-2.0/ruby-omniauth-shibboleth.log

[1] - https://github.com/omniauth/omniauth/releases/tag/v2.0.0
[2] - 
https://salsa.debian.org/ruby-team/ruby-omniauth-shibboleth/-/blob/master/spec/omniauth/strategies/shibboleth_spec.rb#L54

-- 
╭────────────────────────────────────────────────────╮
│ Mohammed Bilal                                     │
│ 2D65 BC1E B966 5A6E 97F9  730A B3F5 9452 8521 9E1F │
╰────────────────────────────────────────────────────╯
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20220510/ccfe40a5/attachment-0001.sig>


More information about the Pkg-ruby-extras-maintainers mailing list