-
Notifications
You must be signed in to change notification settings - Fork 981
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #9249 - associated_host fixed for all compute resources
- Loading branch information
1 parent
8742991
commit 81a02cd
Showing
12 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require 'test_helper' | ||
|
||
class EC2Test < ActiveSupport::TestCase | ||
test "#associated_host matches any NIC" do | ||
host = FactoryGirl.create(:host, :ip => '10.0.0.154') | ||
cr = FactoryGirl.build(:ec2_cr) | ||
iface = mock('iface1', :public_ip_address => '10.0.0.154', :private_ip_address => "10.1.1.1") | ||
assert_equal host, as_admin { cr.associated_host(iface) } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require 'test_helper' | ||
|
||
class LibvirtTest < ActiveSupport::TestCase | ||
test "#associated_host matches any NIC" do | ||
host = FactoryGirl.create(:host, :mac => 'ca:d0:e6:32:16:97') | ||
cr = FactoryGirl.build(:libvirt_cr) | ||
iface = mock('iface1', :mac => 'ca:d0:e6:32:16:97') | ||
assert_equal host, as_admin { cr.associated_host(iface) } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require 'test_helper' | ||
|
||
class OpenstackTest < ActiveSupport::TestCase | ||
test "#associated_host matches any NIC" do | ||
host = FactoryGirl.create(:host, :ip => '10.0.0.154') | ||
cr = FactoryGirl.build(:openstack_cr) | ||
iface = mock('iface1', :floating_ip_address => '10.0.0.154', :private_ip_address => "10.1.1.1") | ||
assert_equal host, as_admin { cr.associated_host(iface) } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require 'test_helper' | ||
|
||
class RackspaceTest < ActiveSupport::TestCase | ||
test "#associated_host matches any NIC" do | ||
host = FactoryGirl.create(:host, :ip => '10.0.0.154') | ||
cr = FactoryGirl.build(:rackspace_cr) | ||
iface = mock('iface1', :public_ip_address => '10.0.0.154', :private_ip_address => "10.1.1.1") | ||
assert_equal host, as_admin { cr.associated_host(iface) } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters