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.
Actions