Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MiqServer.seed should not call Zone.seed #18173

Merged
merged 1 commit into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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