Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

kensa test sso X fails if JSON is returned #35

Open
Genkilabs opened this issue Jul 10, 2012 · 1 comment
Open

kensa test sso X fails if JSON is returned #35

Genkilabs opened this issue Jul 10, 2012 · 1 comment

Comments

@Genkilabs
Copy link

If you accidentally return json you will receive the error, even if the status is good/accepted


Check displays the heroku layout/Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/lib/heroku/kensa/check.rb:457:in `block in call!': undefined method `search' for #<Mechanize::File:0x007fa208b999c8> (NoMethodError)
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/lib/heroku/kensa/check.rb:28:in `check'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/lib/heroku/kensa/check.rb:418:in `check'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/lib/heroku/kensa/check.rb:456:in `call!'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/lib/heroku/kensa/check.rb:45:in `call'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/lib/heroku/kensa/client.rb:168:in `block in run_check'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/lib/heroku/kensa/client.rb:165:in `each'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/lib/heroku/kensa/client.rb:165:in `run_check'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/lib/heroku/kensa/client.rb:64:in `test'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/lib/heroku/kensa/client.rb:21:in `run!'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/gems/kensa-1.4.1/bin/kensa:17:in `<top (required)>'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/bin/kensa:23:in `load'
    from /Users/Gingitsune/.rvm/gems/ruby-1.9.3-rc1/bin/kensa:23:in `<main>'

This can be reproduced like this:

  #GET /heroku/resources/:id
  #This is a Heroku SSO, check creds then redirect
  def sso_login
    pass, message, status = sso_auth? #check credentials and return: bool, string, [200,401]

    # render :text => message, :status => status, :layout => true
    render :json => message, :status => status #blows up `kensa test sso 1`
  end
@carlhoerberg
Copy link
Contributor

you get this even if you're returning 303..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants