Skip to content

Commit

Permalink
Merge pull request #17522 from lpichler/fix_sporadic_failure_with_region
Browse files Browse the repository at this point in the history
Ensure uniqueness in MiqRegion rspec factory
  • Loading branch information
jrafanie authored Jun 6, 2018
2 parents ad1145a + b3f7392 commit b54878c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/factories/miq_region.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FactoryGirl.define do
region_remote = MiqRegion.my_region_number

factory :miq_region do
sequence(:region) { |reg| reg }
sequence(:region) { |region| region == region_remote ? region + 1 : region }
end
end

0 comments on commit b54878c

Please sign in to comment.