Project

General

Profile

Actions

Bug #19344

closed

Intermittent test failure in "UsergroupTest.test_0003_hosts should be retrieved from recursive/complex usergroup definitions"

Added by Dominic Cleal over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tests
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The following test failure occurred on develop (at 006929d):

UsergroupTest.test_0003_hosts should be retrieved from recursive/complex usergroup definitions

--- expected
+++ actual
@@ -1 +1 @@
-[#<Host::Managed id: 6, name: "host10", last_compile: nil, last_report: nil, updated_at: "2017-04-21 10:11:34", created_at: "2017-04-21 10:11:34", root_pass: "$5$8ss8vcIg$TaIAHUsKlz5MhOxbtockec0ObXlnFyxQegAfpE...", architecture_id: nil, operatingsystem_id: nil, environment_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 980190972, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: false, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 447626438, location_id: 255093256, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "$1$icti7NPx$Fe7rlkXozpoAuKovKsMzL/", global_status: 0, lookup_value_matcher: "fqdn=host10", pxe_loader: nil>, #<Host::Managed id: 3, name: "host7", last_compile: nil, last_report: nil, updated_at: "2017-04-21 10:11:34", created_at: "2017-04-21 10:11:34", root_pass: "$5$0dUPENns$99bB.APaogncUpgqx7qAhVf0tilukXqoQSVfIn...", architecture_id: nil, operatingsystem_id: nil, environment_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 14, owner_type: "Usergroup", enabled: true, puppet_ca_proxy_id: nil, managed: false, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 447626438, location_id: 255093256, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "$1$aeVH7TLm$3KNTsWuQzLozEUlaDVnb/.", global_status: 0, lookup_value_matcher: "fqdn=host7", pxe_loader: nil>]
+[#<Host::Managed id: 3, name: "host7", last_compile: nil, last_report: nil, updated_at: "2017-04-21 10:11:34", created_at: "2017-04-21 10:11:34", root_pass: "$5$0dUPENns$99bB.APaogncUpgqx7qAhVf0tilukXqoQSVfIn...", architecture_id: nil, operatingsystem_id: nil, environment_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 14, owner_type: "Usergroup", enabled: true, puppet_ca_proxy_id: nil, managed: false, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 447626438, location_id: 255093256, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "$1$aeVH7TLm$3KNTsWuQzLozEUlaDVnb/.", global_status: 0, lookup_value_matcher: "fqdn=host7", pxe_loader: nil>, #<Host::Managed id: 6, name: "host10", last_compile: nil, last_report: nil, updated_at: "2017-04-21 10:11:34", created_at: "2017-04-21 10:11:34", root_pass: "$5$8ss8vcIg$TaIAHUsKlz5MhOxbtockec0ObXlnFyxQegAfpE...", architecture_id: nil, operatingsystem_id: nil, environment_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 980190972, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: false, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 447626438, location_id: 255093256, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "$1$icti7NPx$Fe7rlkXozpoAuKovKsMzL/", global_status: 0, lookup_value_matcher: "fqdn=host10", pxe_loader: nil>]
 (Minitest::Assertion)
/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.4/slave/fast/test/models/usergroup_test.rb:64

The test appears to be expecting a different order in the returned results.

The test sorts the returned result, but Host::Managed#<=> implements sorting by name (i.e. host10, host7), rather than ID. The expected order is by ID.

Actions #1

Updated by Dominic Cleal over 7 years ago

Minitest seed was 19982, using tasks jenkins:unit jenkins:integration.

Actions #2

Updated by The Foreman Bot over 7 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4476 added
Actions #3

Updated by Dominic Cleal over 7 years ago

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

Updated by Marek Hulán almost 7 years ago

  • Translation missing: en.field_release set to 240
Actions

Also available in: Atom PDF