Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4393 from golemfactory/mwu/int-fix-rpc
Browse files Browse the repository at this point in the history
Fixed rpc tests after disabling concent
  • Loading branch information
maaktweluit authored Jul 1, 2019
2 parents a96d256 + ceb736c commit 71dd4c5
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from ..playbook import Playbook as NodeTestPlaybook
from scripts.node_integration_tests.playbooks.test_config_base import NodeId


class Playbook(NodeTestPlaybook):
def step_verify_deposit_balance_call(self):
def on_success(result):
if result['value'] and result['status'] and result['timelock']:
print("Result correct %s" % result)
self.next()
else:
print("Unexpected result: %s" % result)
self.fail()

def on_error(error):
self.fail(error)

return self.call(NodeId.provider, 'pay.deposit_balance',
on_success=on_success, on_error=on_error)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from scripts.node_integration_tests.playbooks.test_config_base import \
TestConfigBase


class TestConfig(TestConfigBase):
def __init__(self):
super().__init__()
for node_config in self.nodes.values():
node_config.concent = 'staging'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ....base import NodeTestPlaybook
from ..playbook import Playbook as NodeTestPlaybook


class Playbook(NodeTestPlaybook):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from ....test_config_base import TestConfigBase
from scripts.node_integration_tests.playbooks.test_config_base import \
TestConfigBase


class TestConfig(TestConfigBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@

class Playbook(NodeTestPlaybook):
def step_verify_deposit_balance_call(self):
def on_success(result):
if result['value'] and result['status'] and result['timelock']:
print("Result correct %s" % result)
self.next()
else:
print("Unexpected result: %s" % result)
def on_success(_):
self.next()

def on_error(error):
self.fail(error)
Expand Down

This file was deleted.

This file was deleted.

9 changes: 6 additions & 3 deletions scripts/node_integration_tests/tests/test_golem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from golem.core.variables import PROTOCOL_CONST

from .base import NodeTestBase
from .base import NodeTestBase, disable_key_reuse


class GolemNodeTest(NodeTestBase):
Expand All @@ -16,9 +16,12 @@ def test_concent(self):
def test_rpc(self):
self._run_test('golem.rpc_test')

def test_rpc_concent(self):
self._run_test('golem.rpc_test.concent')

@disable_key_reuse
def test_rpc_mainnet(self):
self._run_test(
'golem.rpc_test.mainnet', '--mainnet')
self._run_test('golem.rpc_test.mainnet', '--mainnet')

def test_task_timeout(self):
self._run_test('golem.task_timeout')
Expand Down

0 comments on commit 71dd4c5

Please sign in to comment.