Actions
Bug #11808
openAdd FactoryGirl.lint to the test suite and fix broken factories
Status:
New
Priority:
Normal
Assignee:
-
Category:
Tests
Target version:
-
Description
Running FactoryGirl.lint on the factories in Foreman reveals that a number of them are broken:
/home/dadavis/.rvm/gems/ruby-2.0.0-p643@foreman/gems/factory_girl-4.5.0/lib/factory_girl/linter.rb:14:in `lint!': The following factories are invalid: (FactoryGirl::InvalidFactoryError) * free_ipa_auth_source - uninitialized constant FreeIpaAuthSource (NameError) * active_directory_auth_source - uninitialized constant ActiveDirectoryAuthSource (NameError) * posix_auth_source - uninitialized constant PosixAuthSource (NameError) * bookmark - Validation failed: Controller can't be blank, Controller is not a valid controller (ActiveRecord::RecordInvalid) * compute_resource - Validation failed: Provider can't be blank, Provider is not included in the list (ActiveRecord::RecordInvalid) * image - Validation failed: Provider can't be blank, Provider is not included in the list (ActiveRecord::RecordInvalid) * feature - Validation failed: Name can't be blank (ActiveRecord::RecordInvalid) * parameter - Validation failed: Reference parameters require an associated domain, operating system, host or host group (ActiveRecord::RecordInvalid) * host_parameter - Validation failed: Reference parameters require an associated domain, operating system, host or host group (ActiveRecord::RecordInvalid) * hostgroup_parameter - Validation failed: Reference parameters require an associated domain, operating system, host or host group (ActiveRecord::RecordInvalid) * nic_base - Validation failed: Host can't be blank (ActiveRecord::RecordInvalid) * nic_interface - Validation failed: Host can't be blank (ActiveRecord::RecordInvalid) * nic_managed - Validation failed: Host can't be blank (ActiveRecord::RecordInvalid) * nic_bmc - Validation failed: Host can't be blank (ActiveRecord::RecordInvalid) * nic_bond - Validation failed: Host can't be blank (ActiveRecord::RecordInvalid) * nic_primary_and_provision - undefined method `read_attribute' for nil:NilClass (NoMethodError) * environment_class - Validation failed: Puppetclass can't be blank, Environment can't be blank (ActiveRecord::RecordInvalid) * lookup_key - Validation failed: Puppetclass can't be blank (ActiveRecord::RecordInvalid) * lookup_value - undefined method `key_type' for nil:NilClass (NoMethodError) * trends - undefined method `new' for Trends:Module (NoMethodError) * foreman_trends - undefined method `constantize' for nil:NilClass (NoMethodError) * trend_counter - Validation failed: Count is not a number (ActiveRecord::RecordInvalid) * external_usergroup - No such address or other socket error. (Net::LDAP::Error) * user_role - Validation failed: Owner can't be blank (ActiveRecord::RecordInvalid) * usergroup_member - Unknown member type (ArgumentError) * container_resource - Validation failed: Provider can't be blank, Provider is not included in the list, Url can't be blank (ActiveRecord::RecordInvalid)
I also recommend adding the FactoryGirl.lint to the test suite as it can verify factories in a matter of seconds.
No data to display
Actions