Skip to content

Commit

Permalink
Merge pull request #18173 from bdunne/remove_incorrect_zone_seed
Browse files Browse the repository at this point in the history
MiqServer.seed should not call Zone.seed
  • Loading branch information
carbonin authored Nov 8, 2018
2 parents 951f7b4 + ff63ba1 commit 879bc8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/models/miq_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ def start

def self.seed
unless exists?(:guid => my_guid)
Zone.seed
_log.info("Creating Default MiqServer with guid=[#{my_guid}], zone=[#{Zone.default_zone.name}]")
create!(:guid => my_guid, :zone => Zone.default_zone)
my_server_clear_cache
Expand Down
5 changes: 4 additions & 1 deletion spec/models/miq_server_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
describe MiqServer do
include_examples ".seed called multiple times"
context ".seed" do
before { Zone.seed }
include_examples ".seed called multiple times"
end

context "#hostname" do
it("with a valid hostname") { expect(MiqServer.new(:hostname => "test").hostname).to eq("test") }
Expand Down

0 comments on commit 879bc8f

Please sign in to comment.