Fix typo on tests #470
GitHub Actions / Test Results
failed
Oct 22, 2024 in 0s
2 fail, 6 skipped, 46 pass in 6s
Annotations
Check warning on line 0 in tests.unit.test_prompt_feeder_local.PromptFeederUnitTests
github-actions / Test Results
test_docker_config_all_local (tests.unit.test_prompt_feeder_local.PromptFeederUnitTests) failed
node-runner-cli/junit/test-results.xml [took 0s]
Raw output
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
self = <tests.unit.test_prompt_feeder_local.PromptFeederUnitTests testMethod=test_docker_config_all_local>
mockout = <_io.StringIO object at 0x7fd6d84f2a70>
@patch("sys.stdout", new_callable=StringIO)
def test_docker_config_all_local(self, mockout):
urllib3.disable_warnings()
with open("/tmp/genesis.json", "w") as fp:
pass
PROMPT_NETWORKID = "2"
PROMPT_FULLNODE_YES_NO = "Y"
PROMPT_SEEDNODES = "radix://node_tdx_22_1qvsml9pe32rzcrmw6jx204gjeng09adzkqqfz0ewhxwmjsaas99jzrje4u3@34.243.93.185"
PROMPT_VALIDATOR_ADDRESS = "N"
PROMPT_EXISTING_KEYSTORE = "Y"
PROMPT_KEYSTORE_LOCATION = "/tmp/babylon-node-config"
PROMPT_KEYSTORE_FILE_NAME = "node-keystore.ks"
PROMPT_LEDGER_LOCATION = "/tmp/data"
PROMPT_NGINX_PROTECT_CORE_API = "true"
PROMPT_ENABLE_GATEWAY = "Y"
PROMPT_GATEWAY_CORE_API_URL = "http://core:3333/core"
PROMPT_GATEWAY_CORE_API_NAME = "core"
PROMPT_POSTGRES_LOCAL_REMOTE = "local"
PROMPT_POSTGRES_USERNAME = "postgres"
PROMPT_POSTGRES_DATABASE_NAME = "radix-ledger"
PROMPT_POSTGRES_PASSWORD = "pgpassword"
PROMPT_GATEWAY_IMAGE_VERSION = ""
PROMPT_MIGRATION_IMAGE_VERSION = ""
PROMPT_AGGREGATOR_IMAGE_VERSION = ""
PROMPT_NGINX_PROTECT_GATEWAY = "true"
PROMPT_NGINX_IMAGE_VERSION = ""
PROMPT_CONFIRM_CONFIG = "Y"
with patch(
"builtins.input",
side_effect=[
PROMPT_NETWORKID,
PROMPT_FULLNODE_YES_NO,
PROMPT_SEEDNODES,
PROMPT_VALIDATOR_ADDRESS,
PROMPT_EXISTING_KEYSTORE,
PROMPT_KEYSTORE_LOCATION,
PROMPT_KEYSTORE_FILE_NAME,
PROMPT_LEDGER_LOCATION,
PROMPT_NGINX_PROTECT_CORE_API,
PROMPT_ENABLE_GATEWAY,
PROMPT_GATEWAY_CORE_API_URL,
PROMPT_GATEWAY_CORE_API_NAME,
PROMPT_POSTGRES_LOCAL_REMOTE,
PROMPT_POSTGRES_USERNAME,
PROMPT_POSTGRES_DATABASE_NAME,
PROMPT_POSTGRES_PASSWORD,
PROMPT_GATEWAY_IMAGE_VERSION,
PROMPT_MIGRATION_IMAGE_VERSION,
PROMPT_AGGREGATOR_IMAGE_VERSION,
PROMPT_NGINX_PROTECT_GATEWAY,
PROMPT_NGINX_IMAGE_VERSION,
],
):
with patch(
"sys.argv",
[
"main",
"docker",
"config",
"-m",
"DETAILED",
"-k",
"radix",
"-nk",
"-a",
"-d",
"/tmp",
],
):
> main()
tests/unit/test_prompt_feeder_local.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
babylonnode.py:93: in main
dockercli_args.func(dockercli_args)
commands/dockercommand.py:197: in config
docker_config = DockerSetup.questionary(argument_object)
setup/DockerSetup.py:363: in questionary
if docker_config.common_config.check_nginx_required():
config/CommonDockerConfig.py:73: in check_nginx_required
if json.loads(self.nginx_settings.protect_core.lower()):
/opt/hostedtoolcache/Python/3.10.6/x64/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/opt/hostedtoolcache/Python/3.10.6/x64/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7fd6db9289a0>, s = 'y', idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/opt/hostedtoolcache/Python/3.10.6/x64/lib/python3.10/json/decoder.py:355: JSONDecodeError
Check warning on line 0 in tests.unit.test_prompt_feeder_local.PromptFeederUnitTests
github-actions / Test Results
test_docker_config_gateway_external_postgres (tests.unit.test_prompt_feeder_local.PromptFeederUnitTests) failed
node-runner-cli/junit/test-results.xml [took 0s]
Raw output
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
self = <tests.unit.test_prompt_feeder_local.PromptFeederUnitTests testMethod=test_docker_config_gateway_external_postgres>
mockout = <_io.StringIO object at 0x7fd6d84f3a30>
@patch("sys.stdout", new_callable=StringIO)
def test_docker_config_gateway_external_postgres(self, mockout):
urllib3.disable_warnings()
PROMPT_NETWORKID = "14"
PROMPT_FULLNODE_YES_NO = "Y"
# PROMPT_SEEDNODES = ''
PROMPT_VALIDATOR_ADDRESS = "n"
PROMPT_EXISTING_KEYSTORE = "Y"
PROMPT_KEYSTORE_LOCATION = ""
PROMPT_KEYSTORE_FILE_NAME = ""
PROMPT_LEDGER_LOCATION = ""
PROMPT_NGINX_PROTECT_CORE_API = ""
PROMPT_ENABLE_GATEWAY = "Y"
PROMPT_GATEWAY_CORE_API_URL = "http://core:3333/core"
PROMPT_GATEWAY_CORE_API_NAME = ""
PROMPT_POSTGRES_LOCAL_REMOTE = "remote"
PROMPT_POSTGRES_REMOTE_URL = "postgres"
PROMPT_POSTGRES_REMOTE_PORT = "5432"
PROMPT_POSTGRES_DATABASE_NAME = ""
PROMPT_POSTGRES_USERNAME = ""
PROMPT_POSTGRES_PASSWORD = "radix"
PROMPT_GATEWAY_IMAGE_VERSION = ""
PROMPT_MIGRATION_IMAGE_VERSION = ""
PROMPT_AGGREGATOR_IMAGE_VERSION = ""
PROMPT_NGINX_PROTECT_GATEWAY = "true"
PROMPT_NGINX_IMAGE_VERSION = ""
PROMPT_CONFIRM_CONFIG = "Y"
with patch(
"builtins.input",
side_effect=[
PROMPT_NETWORKID,
PROMPT_FULLNODE_YES_NO,
# PROMPT_SEEDNODES,
PROMPT_VALIDATOR_ADDRESS,
PROMPT_EXISTING_KEYSTORE,
PROMPT_KEYSTORE_LOCATION,
PROMPT_KEYSTORE_FILE_NAME,
PROMPT_LEDGER_LOCATION,
PROMPT_NGINX_PROTECT_CORE_API,
PROMPT_ENABLE_GATEWAY,
PROMPT_GATEWAY_CORE_API_URL,
PROMPT_GATEWAY_CORE_API_NAME,
PROMPT_POSTGRES_LOCAL_REMOTE,
PROMPT_POSTGRES_REMOTE_URL,
PROMPT_POSTGRES_REMOTE_PORT,
PROMPT_POSTGRES_DATABASE_NAME,
PROMPT_POSTGRES_USERNAME,
PROMPT_POSTGRES_PASSWORD,
PROMPT_GATEWAY_IMAGE_VERSION,
PROMPT_MIGRATION_IMAGE_VERSION,
PROMPT_AGGREGATOR_IMAGE_VERSION,
PROMPT_NGINX_PROTECT_GATEWAY,
PROMPT_NGINX_IMAGE_VERSION,
PROMPT_CONFIRM_CONFIG,
],
):
with patch(
"sys.argv",
[
"main",
"docker",
"config",
"-m",
"DETAILED",
"-k",
"radix",
"-nk",
"-t",
"asdasd",
],
):
> main()
tests/unit/test_prompt_feeder_local.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
babylonnode.py:93: in main
dockercli_args.func(dockercli_args)
commands/dockercommand.py:197: in config
docker_config = DockerSetup.questionary(argument_object)
setup/DockerSetup.py:363: in questionary
if docker_config.common_config.check_nginx_required():
config/CommonDockerConfig.py:73: in check_nginx_required
if json.loads(self.nginx_settings.protect_core.lower()):
/opt/hostedtoolcache/Python/3.10.6/x64/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/opt/hostedtoolcache/Python/3.10.6/x64/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7fd6db9289a0>, s = 'y', idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/opt/hostedtoolcache/Python/3.10.6/x64/lib/python3.10/json/decoder.py:355: JSONDecodeError
Loading