Project

General

Profile

Bug #17550

populating test DB fails on fresh install

Added by Justin Sherrill over 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Tests
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Error thrown:

ERROR:  relation "settings" does not exist (ActiveRecord::StatementInvalid)
LINE 5:                WHERE a.attrelid = '"settings"'::regclass
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"settings"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `block in exec_no_cache'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.7.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `exec_no_cache'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/postgresql_adapter.rb:584:in `execute_and_clear'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/postgresql_adapter.rb:733:in `column_definitions'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:197:in `columns'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/schema_cache.rb:43:in `columns'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/attributes.rb:93:in `columns'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/attributes.rb:98:in `columns_hash'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/relation/query_methods.rb:969:in `block in create_binds'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/relation/query_methods.rb:967:in `each'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/relation/query_methods.rb:967:in `partition'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/relation/query_methods.rb:967:in `create_binds'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/relation/query_methods.rb:954:in `build_where'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/relation/query_methods.rb:584:in `where!'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/relation/query_methods.rb:574:in `where'
    from /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.7.1/lib/active_record/querying.rb:10:in `where'
    from /home/vagrant/git/foreman/app/models/setting.rb:81:in `[]'
    from /home/vagrant/git/katello/engines/bastion_katello/lib/bastion_katello/engine.rb:42:in `block in <class:Engine>'

Associated revisions

Revision be8ede9e (diff)
Added by Justin Sherrill over 4 years ago

Fixes #17550 - load test db when schema not present

otherwise trying to run rake test or otherwise load the
test db would fail, because the settings table would not exist

History

#1 Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6479 added

#2 Updated by Justin Sherrill over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Justin Sherrill over 4 years ago

  • Legacy Backlogs Release (now unused) set to 188

Also available in: Atom PDF