Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
test "should not save if root password is undefined and host is managed" do
Setting[:root_pass] = nil
host = Host.create :name => "myfullhost", :managed => true
assert !host.valid?
assert host.errors[:root_pass].include?("should not be blank")
end
test "should save if root password is undefined when the compute resource is image capapble"
Setting[:root_pass] = nil
host = Host.create :name => "myfullhost", :managed => true, :compute_resource_id => compute_resources(:openstack).id
host.valid?
assert !host.errors[:root_pass].include?("should not be blank")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.