Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
7) MiqSchedule with schedule infrastructure and valid run_ats valid schedules for db_backup calling run adhoc_db_backup should create no database backups
Failure/Error: @region.database_backups.count.should == 0
ActiveRecord::StatementInvalid:
PGError: ERROR: column database_backups.miq_region_id does not exist
LINE 1: SELECT COUNT(*) FROM "database_backups" WHERE "database_bac...
^
: SELECT COUNT(*) FROM "database_backups" WHERE "database_backups"."miq_region_id" = 594
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:1346:in `async_exec'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:1346:in `block in exec_no_cache'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:1284:in `with_auto_reconnect'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:1345:in `exec_no_cache'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:736:in `block in exec_query'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:287:in `block in log'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:282:in `log'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:735:in `exec_query'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:1452:in `select'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_one'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:30:in `select_value'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/relation/calculations.rb:250:in `execute_simple_calculation'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/relation/calculations.rb:215:in `perform_calculation'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/relation/calculations.rb:159:in `calculate'
# ./lib/extensions/ar_virtual.rb:330:in `calculate_with_virtual'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/relation/calculations.rb:58:in `count'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/associations/collection_association.rb:210:in `count'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/rails-cab310aeee22/activerecord/lib/active_record/associations/collection_proxy.rb:46:in `count'
# ./spec/models/miq_schedule_spec.rb:608:in `block (5 levels) in <top (required)>'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in `instance_eval'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in `block in run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:254:in `with_around_each_hooks'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:111:in `run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:390:in `block in run_examples'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in `map'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in `run_examples'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:371:in `run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `block in run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `map'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `block in run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `map'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `block in run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `map'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `map'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `block in run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/reporter.rb:58:in `report'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:25:in `run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'
# /Users/aaron/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `block in autorun'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment