Fix wrong setting of custom hostname by whole node struct
Use another node to validate duplacate hostname case
Change-Id: I755ca0e1c404b0adc35282d4d69639a7ba80db92
Closes-bug: #1610978
(cherry picked from commit f63a1ac4f0
)
This commit is contained in:
parent
2c219d3d77
commit
6669d4625f
|
@ -14,7 +14,7 @@
|
|||
from random import randrange
|
||||
from re import match
|
||||
|
||||
from keystoneauth1.exceptions import BadRequest
|
||||
from keystoneauth1.exceptions import BadRequest, Conflict
|
||||
from proboscis.asserts import assert_equal
|
||||
from proboscis.asserts import assert_raises
|
||||
from proboscis.asserts import assert_true
|
||||
|
@ -233,12 +233,14 @@ class CustomHostname(TestBasic):
|
|||
node = self.fuel_web.client.list_nodes()[0]
|
||||
self.fuel_web.client.set_hostname(node['id'], custom_hostname)
|
||||
|
||||
# Try to change the hostname of the provisioned node
|
||||
# Try to set duplicate hostname for another node
|
||||
node = self.fuel_web.client.list_nodes()[1]
|
||||
assert_raises(
|
||||
BadRequest,
|
||||
Conflict,
|
||||
self.fuel_web.client.set_hostname,
|
||||
node,
|
||||
custom_hostname)
|
||||
node["id"],
|
||||
custom_hostname
|
||||
)
|
||||
|
||||
self.env.make_snapshot("set_duplicate_hostname")
|
||||
|
||||
|
|
Loading…
Reference in New Issue