Actions
Bug #9044
closedTests can fail randomly on mac.succ
Description
In some tests we use mac.succ to get next new address in order to test mac change. The original mac is generated by factory girl sequence so with more tests using this factory girl the mac changes in tests. When we get mac ending with '...:.f' and we call succ we get invalid mac containing 'g'. It causes hard to debug issues since when we validate host we normalize the mac (see validations.rb) which does not match invalid mac resulting in nilifying the attribute.
To illustrate
host.mac = host.mac.succ
host.mac.present? # => true
host.valid? # host.mac is nil now, causing validations errors
I'll change tests to correctly increment mac address and I'll change the mac normalization method to handle "else" in case.
Updated by The Foreman Bot over 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2097 added
- Pull request deleted (
)
Updated by Dominic Cleal over 9 years ago
- Blocks Bug #8052: Smart class parameters with ERB snippets are broken for other that String types added
Updated by Dominic Cleal over 9 years ago
- Translation missing: en.field_release set to 30
Updated by Marek Hulán over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset ee1f56de6b2bdca4dfd104b99ec25340bfb51aaa.
Updated by Dominic Cleal over 9 years ago
- Translation missing: en.field_release changed from 30 to 32
Updated by Dominic Cleal over 9 years ago
- Related to Bug #9195: MAC address validator raises an error if MAC is invalid instead of recording an error in validated object added
Actions