Project

General

Profile

Bug #25602

audit failures with Rails 5.2.2

Added by Anonymous almost 2 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

The following two failures can be seen, starting with https://github.com/rails/rails/commit/7794d00c7a966a63d98331cfd986edb1d2ccdb2c

AuditAssociationsTest#test_0002_Should audit associations on update [.../test/models/concerns/audit_associations_test.rb:27]:
Expected: [[], [15]]
  Actual: [[7], [15]]

UserTest::audit user roles#test_0001_should audit when a role is assigned to a user [.../test/models/user_test.rb:1214]:
Expected [7] to be empty.

Related issues

Blocks Foreman - Tracker #25601: Rails 5.2.4 trackerRejected

Associated revisions

Revision b51bf342 (diff)
Added by Tomer Brisker 11 months ago

Fixes #25602 - Correct tests for user role audits

Auditing user role changes should show the default role in the previous
version. Due to a bug in Rails 5.2.1 which is fixed in 5.2.2, this was
not showing up when the object was saved without reloading. We now
reload explicitly to allow backward compatibility for both Rails
versions, the reload can be removed once we upgrade to newer Rails.

History

#1 Updated by Anonymous almost 2 years ago

#2 Updated by Kavita Gaikwad over 1 year ago

  • Assignee set to Kavita Gaikwad

#3 Updated by Kavita Gaikwad about 1 year ago

  • Status changed from New to Resolved

Marking it as resolved as not able to reproduce with the changes from https://projects.theforeman.org/issues/27185.

#4 Updated by Kavita Gaikwad about 1 year ago

  • Related to Bug #27185: Reset changed? state after saving with DirtyAssociations added

#5 Updated by Kavita Gaikwad about 1 year ago

  • Status changed from Resolved to Assigned

Reopening this as this test is failing on 5.2.3. My apologies!

#6 Updated by Kavita Gaikwad about 1 year ago

  • Related to deleted (Bug #27185: Reset changed? state after saving with DirtyAssociations)

#7 Updated by Tomer Brisker 12 months ago

  • Category set to Rails

#8 Updated by The Foreman Bot 11 months ago

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

#9 Updated by Tomer Brisker 11 months ago

  • Assignee changed from Kavita Gaikwad to Tomer Brisker

#10 Updated by The Foreman Bot 11 months ago

  • Fixed in Releases 2.0.0 added

#11 Updated by Tomer Brisker 11 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF