Project

General

Profile

Actions

Bug #19487

closed

Random tests failures in OpenscapProxiesControllerTest

Added by Marek Hulán almost 7 years ago. Updated over 5 years ago.

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

Description

The factory for openscap proxy creates a proxy for compliance host, if tests using compliance host is ran first, rest tests fail with

Error Message

ActiveRecord::RecordInvalid: Validation failed: Name has already been taken...
Stacktrace

ActiveRecord::RecordInvalid: Validation failed: Name has already been taken
    test_after_commit (1.1.0) lib/test_after_commit/database_statements.rb:11:in `block in transaction'
    test_after_commit (1.1.0) lib/test_after_commit/database_statements.rb:5:in `transaction'
    test/factories/disable_auditing.rb:13:in `block (3 levels) in <top (required)>'
    test/factories/disable_auditing.rb:13:in `block (2 levels) in <top (required)>' (ActiveRecord::RecordInvalid)
/usr/local/rvm/gems/ruby-2.4.0@test_plugin_pull_request-1/gems/activerecord-4.2.8/lib/active_record/validations.rb:43   

The proxy definition must be in block so it gets evaluated during runtime

Actions #1

Updated by The Foreman Bot almost 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_openscap/pull/256 added
Actions #2

Updated by Marek Hulán almost 7 years ago

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

Also available in: Atom PDF