Project

General

Profile

Actions

Bug #12996

closed

Tests with errors after removing a plugin

Added by Ori Rabin almost 9 years ago. Updated over 6 years ago.

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

Description

Some of the tests use the attributes method which return a hash of all the attributes in the db.
As a result after adding a plugin and removing it without getting rid of the columns that were added to host you get:

HostsControllerTest#test_0072_template_used returns templates with interfaces:
ActiveModel::MassAssignmentSecurity::Error: Can't mass-assign protected attributes for Host::Managed: salt_proxy_id, salt_environment_id
    app/controllers/hosts_controller.rb:606:in `template_used'
    app/controllers/concerns/application_shared.rb:13:in `set_timezone'
    app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
    test/functional/hosts_controller_test.rb:953:in `block in <class:HostsControllerTest>'

The tests should only try and assign the attributes that belong to Host::Managed.

Actions #1

Updated by The Foreman Bot almost 9 years ago

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

Updated by Ori Rabin almost 9 years ago

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

Updated by Dominic Cleal almost 9 years ago

  • Category set to Tests
  • Translation missing: en.field_release set to 71
Actions

Also available in: Atom PDF