diff --git a/examples/scenario-example-v2.yaml b/examples/scenario-example-v2.yaml index 92326cace..9b1972d61 100644 --- a/examples/scenario-example-v2.yaml +++ b/examples/scenario-example-v2.yaml @@ -40,12 +40,12 @@ token: ## name - Token name, default: autogenerated ## symbol - Token symbol, default: autogenerated ## decimals - Token decimals, default: 0 - ## balance_min - Minimum node balance, default: 5000 + ## balance_min - Minimum node balance, default: 5100 ## reuse - remember the token and reuse it for the next run of this scenario, default: false #name: "Some token" #symbol: "STKN" #decimals: 18 - #balance_min: 5000 + #balance_min: 5100 #reuse: true nodes: diff --git a/scenario_player/services/utils/factories.py b/scenario_player/services/utils/factories.py index 1d79f1c15..9413d1eae 100644 --- a/scenario_player/services/utils/factories.py +++ b/scenario_player/services/utils/factories.py @@ -55,15 +55,15 @@ def default_service_daemon_cli(): Configures the following options: * (required) - must be one of `start` or `stop`. - * --port (optional) - the port to assign to the service. Defaults to 5000. + * --port (optional) - the port to assign to the service. Defaults to 5100. * --host (optional) - the host to assign to the service. Defaults to 127.0.0.1 """ parser = argparse.ArgumentParser() parser.add_argument("command", choices=["start", "stop"]) parser.add_argument( "--port", - default=5000, - help="Port number to run this service on. Defaults to '5000'", + default=5100, + help="Port number to run this service on. Defaults to '5100'", type=int, ) parser.add_argument( diff --git a/scenario_player/utils/configuration/settings.py b/scenario_player/utils/configuration/settings.py index 1de9b70d3..67b839814 100644 --- a/scenario_player/utils/configuration/settings.py +++ b/scenario_player/utils/configuration/settings.py @@ -52,8 +52,8 @@ class UDCTokenSettings(ConfigMapping): ... token: deposit: false - balance_per_node: 5000 - max_funding: 5000 + balance_per_node: 5100 + max_funding: 5100 ... """ @@ -86,7 +86,7 @@ def deposit(self) -> bool: @property def balance_per_node(self) -> int: """The required amount of UDC/RDN tokens required by each node.""" - return int(self.get("balance_per_node", 5000)) + return int(self.get("balance_per_node", 5100)) @property def max_funding(self) -> int: diff --git a/scenario_player/utils/configuration/spaas.py b/scenario_player/utils/configuration/spaas.py index 943b14536..1e643aef8 100644 --- a/scenario_player/utils/configuration/spaas.py +++ b/scenario_player/utils/configuration/spaas.py @@ -42,7 +42,7 @@ def host(self): @property def port(self): - return self.get("port", "5000") + return self.get("port", "5100") @property def netloc(self): diff --git a/scenario_player/utils/interface.py b/scenario_player/utils/interface.py index 7d5034912..a79611865 100644 --- a/scenario_player/utils/interface.py +++ b/scenario_player/utils/interface.py @@ -44,7 +44,7 @@ class SPaaSAdapter(HTTPAdapter): Handles requests made using the `spaas` scheme and maps the url to a configured service, if available. If no configuration for the service exists, we always - assume it's available at localhost:5000 (the default flask port). + assume it's available at localhost:5100 (the default flask port). """ def __init__(self, spaas_settings: SPaaSConfig): @@ -63,7 +63,7 @@ def prep_service_request(self, request) -> requests.PreparedRequest: path = f"{request.service}{parsed[2]}" unparse_args = ( service_conf.scheme or "http", - service_conf.netloc or "localhost:5000", + service_conf.netloc or "localhost:5100", path, *parsed[3:], ) diff --git a/tests/unittests/utils/configuration/conftest.py b/tests/unittests/utils/configuration/conftest.py index e28bd130a..06f1a311c 100644 --- a/tests/unittests/utils/configuration/conftest.py +++ b/tests/unittests/utils/configuration/conftest.py @@ -27,5 +27,5 @@ def expected_defaults(): "node_options": {}, "raiden_version": "LATEST", }, - "spaas": {"rpc": {"scheme": "https", "host": "localhost", "port": 5000}}, + "spaas": {"rpc": {"scheme": "https", "host": "localhost", "port": 5100}}, } diff --git a/tests/unittests/utils/configuration/test_settings.py b/tests/unittests/utils/configuration/test_settings.py index a2e07fdbf..f94cbe4d4 100644 --- a/tests/unittests/utils/configuration/test_settings.py +++ b/tests/unittests/utils/configuration/test_settings.py @@ -161,7 +161,7 @@ def test_attributes_return_for_key_value_if_key_present( @pytest.mark.parametrize( "key, expected", - argvalues=[("deposit", False), ("balance_per_node", 5000), ("max_funding", 5000)], + argvalues=[("deposit", False), ("balance_per_node", 5100), ("max_funding", 5100)], ) def test_attributes_whose_key_is_absent_return_expected_default( self, key, expected, minimal_yaml_dict diff --git a/tests/unittests/utils/configuration/test_spaas.py b/tests/unittests/utils/configuration/test_spaas.py index 71ef5ea55..b5038e2fc 100644 --- a/tests/unittests/utils/configuration/test_spaas.py +++ b/tests/unittests/utils/configuration/test_spaas.py @@ -5,7 +5,7 @@ @pytest.mark.parametrize( "prop, expected_value", - argvalues=[("scheme", "http"), ("port", "5000"), ("netloc", "127.0.0.1:5000")], + argvalues=[("scheme", "http"), ("port", "5100"), ("netloc", "127.0.0.1:5100")], ) def test_service_config_properties_return_expected_defaults_if_keys_missing(prop, expected_value): service_config = SPaaSServiceConfig({}) diff --git a/tests/unittests/utils/test_interface.py b/tests/unittests/utils/test_interface.py index a74f490c8..df2cdc9e8 100644 --- a/tests/unittests/utils/test_interface.py +++ b/tests/unittests/utils/test_interface.py @@ -43,7 +43,7 @@ def test_send_loads_host_and_port_correctly(self, _, scheme, host, port, service SPaaSAdapter.prep_service_request should default to sensible values.""" expected_url = ( - f"{scheme or 'http'}://{host or '127.0.0.1'}:{port or '5000'}/{service}/my-endpoint" + f"{scheme or 'http'}://{host or '127.0.0.1'}:{port or '5100'}/{service}/my-endpoint" ) input_config = {} @@ -112,5 +112,5 @@ def test_exceptions_are_converted_correctly_when_expected( with pytest.raises(expected_err): config = SPaaSConfig({"spaas": {}}) adapter = SPaaSAdapter(config) - req = requests.Request(url="http://127.0.0.1:5000").prepare() + req = requests.Request(url="http://127.0.0.1:5100").prepare() adapter.send(req)