Project

General

Profile

Bug #19741

Undefined method 'split' for nil on several tests

Added by Daniel Lobato Garcia about 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Tests
Target version:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

11 tests have been failing when the Jenkins job that tests Foreman + Katello triggers:


    Katello::ActivationKeyTest.test_0006_key can be copied
    Katello::Api::V2::ContentViewsControllerTest.test_available_puppet_modules_with_use_latest
    Katello::CapsuleContentTest::task related queries.test_0004_last sync time is nil when there's no successful sync
    Katello::ContentViewPuppetModuleTest.test_computed_version_nil
    Katello::ContentViewTest.test_copy
    Katello::GlueCandlepinOwnerTestSLA.test_update_candlepin_owner_service_level
    Katello::HostgroupExtensionsTest.test_inherited_content_view_with_ancestry_nill
    Katello::HostgroupExtensionsTest.test_inherited_lifecycle_environment_with_ancestry_nil
    Katello::RepositoryInstanceTest.test_capsule_download_policy
    Katello::RepositoryInstanceTest.test_nil_url_url
    Katello::SyncPlanTest.test_sync_date_if_bad_interval

All of them fail with the same error, which is surprising given that the lines they fail at have no 'split' or anything similar (nor they call the same method). Running tests individually or all Katello tests via rake test:katello does not reproduce the issue. I think it's only happening with 'bundle exec rake jenkins:katello' (although that just runs 'test:katello'). Removing the db and running tests without db doesn't change anything.

Associated revisions

Revision 885e3f2e (diff)
Added by Daniel Lobato Garcia about 5 years ago

Fixes #19741 - Undefined method split for nil on tests

Due to a bug on minitest that is being currently fixed, our tests are
broken when they run as the "test_develop_pr_katello" job in Jenkins.

The fix is published as https://github.com/seattlerb/minitest/pull/696
however there is no version of minitest with it yet. A possible
workaround is to prevent these assertions like this PR does.

Revision 108f9919 (diff)
Added by Daniel Lobato Garcia about 5 years ago

Refs #19741 - Last test to use assert_nil

History

#1 Updated by Daniel Lobato Garcia about 5 years ago

There is also this at the beginning of these jobs (http://ci.theforeman.org/job/test_develop_pr_katello/2888/database=postgresql,ruby=2.2,slave=fast/consoleFull), which might have to do with these errors or not - I don't think so because other tests pass just fine but just in case I'll leave it here:

[0m] [D] There are 368 pending migrations: CreateHosts, AddAuditsTable, CreateArchitectures, CreateMedia, CreateDomains...
10:54:56 2017-06-01T10:54:56  [app] [D] There are 368 pending migrations: CreateHosts, AddAuditsTable, CreateArchitectures, CreateMedia, CreateDomains...
10:54:56 2017-06-01T10:54:56  [app] [D] Could not extend role 'Manager': PG::UndefinedTable: ERROR:  relation "roles" does not exist
10:54:56  | LINE 5:                WHERE a.attrelid = '"roles"'::regclass
10:54:56  |                                           ^
10:54:56  | :               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
10:54:56  |                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
10:54:56  |                 FROM pg_attribute a LEFT JOIN pg_attrdef d
10:54:56  |                   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
10:54:56  |                WHERE a.attrelid = '"roles"'::regclass
10:54:56  |                  AND a.attnum > 0 AND NOT a.attisdropped
10:54:56  |                ORDER BY a.attnum
10:54:56  | 
10:54:56  | ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "roles" does not exist
10:54:56  | LINE 5:                WHERE a.attrelid = '"roles"'::regclass
10:54:56  |                                           ^
10:54:56  | :               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
10:54:56  |                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
10:54:56  |                 FROM pg_attribute a LEFT JOIN pg_attrdef d
10:54:56  |                   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
10:54:56  |                WHERE a.attrelid = '"roles"'::regclass
10:54:56  |                  AND a.attnum > 0 AND NOT a.attisdropped
10:54:56  |                ORDER BY a.attnum

#2 Updated by The Foreman Bot about 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Pull request https://github.com/Katello/katello/pull/6807 added

#3 Updated by Anonymous about 5 years ago

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

#4 Updated by The Foreman Bot about 5 years ago

  • Pull request https://github.com/Katello/katello/pull/6811 added

#5 Updated by Eric Helms about 5 years ago

  • Legacy Backlogs Release (now unused) set to 250

Also available in: Atom PDF