Skip to content

Commit

Permalink
INDY-1918: Fix for test
Browse files Browse the repository at this point in the history
Signed-off-by: ArtObr <[email protected]>
  • Loading branch information
ArtObr committed Jan 9, 2019
1 parent bff51a6 commit ef7ee68
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions indy_node/test/upgrade/test_broken_connection_control_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ def validUpgrade(nodeIds, tconf, monkeypatch):
sha256='db34a72a90d026dae49c3b3f0436c8d3963476c77468ad955845a1ccf7b03f55')


@pytest.fixture(scope='function')
def skip_functions():
# Do this to prevent exceptions because of node_control_tool absence
old_get_version = Upgrader.getVersion
old_update = Upgrader._update_action_log_for_started_action
Upgrader.getVersion = lambda self, pkg: '1.6.0'
Upgrader._update_action_log_for_started_action = lambda self: 1
yield
Upgrader.getVersion = old_get_version
Upgrader._update_action_log_for_started_action = old_update


def test_node_doesnt_retry_upgrade(
looper, nodeSet, validUpgrade, nodeIds,
sdk_pool_handle, sdk_wallet_trustee, tconf):
Expand Down Expand Up @@ -79,13 +91,9 @@ def test_node_doesnt_retry_upgrade(


def test_node_upgrades_after_restart(looper, nodeSet, testNodeClass, tconf,
tdir, allPluginsPath, validUpgrade):
tdir, allPluginsPath, validUpgrade, skip_functions):
bad_node = nodeSet[1]

# Do this to prevent exceptions because of node_control_tool absence
Upgrader.getVersion = lambda self, pkg: '1.6.0'
Upgrader._update_action_log_for_started_action = lambda self: 1

# Restart bad_node
name = bad_node.name
nodeSet.remove(bad_node)
Expand Down

0 comments on commit ef7ee68

Please sign in to comment.