Fix issue, when accessible more nodes, than required to start test
validate_amount_nodes -> validate_minimal_amount_nodes Closes-bug: #1625456 Change-Id: I4655b980efa6601df15363fd215251a8d63b78fb
This commit is contained in:
parent
19502443f1
commit
284da64133
@ -48,7 +48,7 @@ ssh_manager = SSHManager()
|
||||
|
||||
|
||||
@logwrap
|
||||
def validate_amount_nodes(
|
||||
def validate_minimal_amount_nodes(
|
||||
nodes, expected_amount,
|
||||
state='discover', online=True):
|
||||
"""Validate amount of nodes in state
|
||||
@ -62,7 +62,7 @@ def validate_amount_nodes(
|
||||
fnodes = [
|
||||
node for node in nodes
|
||||
if node['online'] == online and node['status'] == state]
|
||||
if len(fnodes) != expected_amount:
|
||||
if len(fnodes) < expected_amount:
|
||||
raise Exception(
|
||||
'Nodes in state {state} (online: {online}): '
|
||||
'{amount}, while expected: {expected}'.format(
|
||||
|
@ -126,7 +126,7 @@ class EnvironmentModel(six.with_metaclass(SingletonMeta, object)):
|
||||
if not skip_timesync:
|
||||
self.sync_time()
|
||||
|
||||
checkers.validate_amount_nodes(
|
||||
checkers.validate_minimal_amount_nodes(
|
||||
nodes=self.fuel_web.client.list_nodes(),
|
||||
expected_amount=len(devops_nodes)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user