Revision 91b8eed6
Added by Ondřej Pražák almost 6 years ago
test/controllers/api/v2/hosts_controller_test.rb | ||
---|---|---|
@host = FactoryBot.create(:host)
|
||
@ptable = FactoryBot.create(:ptable)
|
||
@ptable.operatingsystems = [ Operatingsystem.find_by_name('Redhat') ]
|
||
Host::Managed.any_instance.stubs(:vm_exists?).returns(true)
|
||
end
|
||
end
|
||
|
||
... | ... | |
Host.any_instance.expects(:apply_compute_profile).with(modifier)
|
||
end
|
||
|
||
def last_record
|
||
Host.unscoped.order(:id).last
|
||
end
|
||
|
||
test "should get index" do
|
||
get :index
|
||
assert_response :success
|
||
... | ... | |
end
|
||
end
|
||
|
||
private
|
||
|
||
def last_record
|
||
Host.unscoped.order(:id).last
|
||
end
|
||
|
||
test "host with two interfaces should get ips assigned on both interfaces" do
|
||
disable_orchestration
|
Also available in: Unified diff
Fixes #24125 - Show error when libvirt not reachable