From c389b33b4816376197eb9bd21a8fda72ad2d1f2d Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Mon, 4 Dec 2023 14:49:51 +1000 Subject: [PATCH 1/3] fix: fixing localnet status error --- src/algokit/cli/localnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algokit/cli/localnet.py b/src/algokit/cli/localnet.py index 47171dd7..330759fc 100644 --- a/src/algokit/cli/localnet.py +++ b/src/algokit/cli/localnet.py @@ -109,7 +109,7 @@ def reset_localnet(*, update: bool) -> None: sandbox.up() -SERVICE_NAMES = ("algod", "indexer", "indexer-db") +SERVICE_NAMES = ("algod", "conduit", "indexer-db", "indexer") @localnet_group.command("status", short_help="Check the status of the AlgoKit LocalNet.") From e599fcd8368fafb0e2a40fb7928fa7c32b90d7ca Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Mon, 4 Dec 2023 16:07:51 +1000 Subject: [PATCH 2/3] test: updating tests --- tests/localnet/test_localnet_status.py | 271 +++++++++++++----- ..._localnet_status_docker_error.approved.txt | 11 +- ...st_localnet_status_http_error.approved.txt | 8 +- ...et_status_service_not_started.approved.txt | 12 +- ...st_localnet_status_successful.approved.txt | 8 +- ...calnet_status_unexpected_port.approved.txt | 11 +- 6 files changed, 238 insertions(+), 83 deletions(-) diff --git a/tests/localnet/test_localnet_status.py b/tests/localnet/test_localnet_status.py index 38c81d2b..746b50de 100644 --- a/tests/localnet/test_localnet_status.py +++ b/tests/localnet/test_localnet_status.py @@ -35,44 +35,71 @@ def test_localnet_status_successful(app_dir_mock: AppDirs, proc_mock: ProcMock, json.dumps( [ { - "ID": "90ce27e631e4d0b048322abd01a9e68e4c899b936ad4e4e3106ad5d9f774a189", + "ID": "e900c9dfe5e4676ca7fb3ac38cbee366ca5429ae447222282b64c059f5727a47", "Name": "algokit_algod", - "Command": "start.sh", + "Image": "algorand/algod:latest", + "Command": "/node/run/run.sh", "Project": "algokit_sandbox", "Service": "algod", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, "Publishers": [ - {"URL": "0.0.0.0", "TargetPort": 4001, "PublishedPort": 4001, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 4002, "PublishedPort": 4002, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}, - ], + {"URL": "", "TargetPort": 4160, "PublishedPort": 0, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, + {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"} + ] + }, + { + "ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", + "Name": "algokit_conduit", + "Image": "algorand/conduit:latest", + "Command": "docker-entrypoint.sh", + "Project": "algokit_sandbox", + "Service": "conduit", + "Created": 1701664778, + "State": "running", + "Status": "", + "Health": "", + "ExitCode": 0, + "Publishers": [] }, { - "ID": "d3a74173d552ac388643ee65c9c6aa4c1864cb1442d0423d62bd95c468ac4b97", - "Name": "algokit_indexer", - "Command": "/tmp/start.sh", + "ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", + "Name": "algokit_sandbox-indexer-1", + "Image": "algorand/indexer:latest", + "Command": "docker-entrypoint.sh daemon --enable-all-parameters", "Project": "algokit_sandbox", "Service": "indexer", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"} - ], + ] }, { - "ID": "9e66aca1cd3542446e7b88f0701122a90f388308f7de0b57b6e2d843b3da9026", + "ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", "Name": "algokit_postgres", + "Image": "postgres:13-alpine", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [{"URL": "", "TargetPort": 5432, "PublishedPort": 0, "Protocol": "tcp"}], - }, + "Publishers": [ + {"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"} + ] + } ] ) ], @@ -106,44 +133,71 @@ def test_localnet_status_http_error(app_dir_mock: AppDirs, proc_mock: ProcMock, json.dumps( [ { - "ID": "00e93d3db91d964d1b2bcf444c938140dc6b43398380374eaac8510f45381973", + "ID": "e900c9dfe5e4676ca7fb3ac38cbee366ca5429ae447222282b64c059f5727a47", "Name": "algokit_algod", - "Command": "start.sh", + "Image": "algorand/algod:latest", + "Command": "/node/run/run.sh", "Project": "algokit_sandbox", "Service": "algod", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, "Publishers": [ - {"URL": "0.0.0.0", "TargetPort": 4001, "PublishedPort": 4001, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 4002, "PublishedPort": 4002, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}, - ], + {"URL": "", "TargetPort": 4160, "PublishedPort": 0, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, + {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"} + ] }, { - "ID": "a242581a65f7e49d376bff9fd8d2288cdd85a28a264657d73db84dbeef6155b7", - "Name": "algokit_indexer", - "Command": "/tmp/start.sh", + "ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", + "Name": "algokit_conduit", + "Image": "algorand/conduit:latest", + "Command": "docker-entrypoint.sh", + "Project": "algokit_sandbox", + "Service": "conduit", + "Created": 1701664778, + "State": "running", + "Status": "", + "Health": "", + "ExitCode": 0, + "Publishers": [] + }, + { + "ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", + "Name": "algokit_sandbox-indexer-1", + "Image": "algorand/indexer:latest", + "Command": "docker-entrypoint.sh daemon --enable-all-parameters", "Project": "algokit_sandbox", "Service": "indexer", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"} - ], + ] }, { - "ID": "9e66aca1cd3542446e7b88f0701122a90f388308f7de0b57b6e2d843b3da9026", + "ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", "Name": "algokit_postgres", + "Image": "postgres:13-alpine", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [{"URL": "", "TargetPort": 5432, "PublishedPort": 0, "Protocol": "tcp"}], - }, + "Publishers": [ + {"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"} + ] + } ] ) ], @@ -176,44 +230,71 @@ def test_localnet_status_unexpected_port(app_dir_mock: AppDirs, proc_mock: ProcM json.dumps( [ { - "ID": "00e93d3db91d964d1b2bcf444c938140dc6b43398380374eaac8510f45381973", + "ID": "e900c9dfe5e4676ca7fb3ac38cbee366ca5429ae447222282b64c059f5727a47", "Name": "algokit_algod", - "Command": "start.sh", + "Image": "algorand/algod:latest", + "Command": "/node/run/run.sh", "Project": "algokit_sandbox", "Service": "algod", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, "Publishers": [ - {"URL": "0.0.0.0", "TargetPort": 4001, "PublishedPort": 4001, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 4002, "PublishedPort": 4002, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}, - ], + {"URL": "", "TargetPort": 4160, "PublishedPort": 0, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, + {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"} + ] }, { - "ID": "a242581a65f7e49d376bff9fd8d2288cdd85a28a264657d73db84dbeef6155b7", - "Name": "algokit_indexer", - "Command": "/tmp/start.sh", + "ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", + "Name": "algokit_conduit", + "Image": "algorand/conduit:latest", + "Command": "docker-entrypoint.sh", + "Project": "algokit_sandbox", + "Service": "conduit", + "Created": 1701664778, + "State": "running", + "Status": "", + "Health": "", + "ExitCode": 0, + "Publishers": [] + }, + { + "ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", + "Name": "algokit_sandbox-indexer-1", + "Image": "algorand/indexer:latest", + "Command": "docker-entrypoint.sh daemon --enable-all-parameters", "Project": "algokit_sandbox", "Service": "indexer", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, "Publishers": [ - {"URL": "0.0.0.0", "TargetPort": 1234, "PublishedPort": 1234, "Protocol": "tcp"} - ], + {"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"} + ] }, { - "ID": "9e66aca1cd3542446e7b88f0701122a90f388308f7de0b57b6e2d843b3da9026", + "ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", "Name": "algokit_postgres", + "Image": "postgres:13-alpine", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [{"URL": "", "TargetPort": 5432, "PublishedPort": 0, "Protocol": "tcp"}], - }, + "Publishers": [ + {"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"} + ] + } ] ) ], @@ -238,44 +319,71 @@ def test_localnet_status_service_not_started(app_dir_mock: AppDirs, proc_mock: P json.dumps( [ { - "ID": "00e93d3db91d964d1b2bcf444c938140dc6b43398380374eaac8510f45381973", + "ID": "e900c9dfe5e4676ca7fb3ac38cbee366ca5429ae447222282b64c059f5727a47", "Name": "algokit_algod", - "Command": "start.sh", + "Image": "algorand/algod:latest", + "Command": "/node/run/run.sh", "Project": "algokit_sandbox", "Service": "algod", - "State": "stopped", + "Created": 1701664778, + "State": "running", + "Status": "", "Health": "", "ExitCode": 0, "Publishers": [ - {"URL": "0.0.0.0", "TargetPort": 4001, "PublishedPort": 4001, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 4002, "PublishedPort": 4002, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}, - ], + {"URL": "", "TargetPort": 4160, "PublishedPort": 0, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, + {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"} + ] }, { - "ID": "a242581a65f7e49d376bff9fd8d2288cdd85a28a264657d73db84dbeef6155b7", - "Name": "algokit_indexer", - "Command": "/tmp/start.sh", + "ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", + "Name": "algokit_conduit", + "Image": "algorand/conduit:latest", + "Command": "docker-entrypoint.sh", + "Project": "algokit_sandbox", + "Service": "conduit", + "Created": 1701664778, + "State": "running", + "Status": "", + "Health": "", + "ExitCode": 0, + "Publishers": [] + }, + { + "ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", + "Name": "algokit_sandbox-indexer-1", + "Image": "algorand/indexer:latest", + "Command": "docker-entrypoint.sh daemon --enable-all-parameters", "Project": "algokit_sandbox", "Service": "indexer", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"} - ], + ] }, { - "ID": "9e66aca1cd3542446e7b88f0701122a90f388308f7de0b57b6e2d843b3da9026", + "ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", "Name": "algokit_postgres", + "Image": "postgres:13-alpine", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [{"URL": "", "TargetPort": 5432, "PublishedPort": 0, "Protocol": "tcp"}], - }, + "Publishers": [ + {"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"} + ] + } ] ) ], @@ -308,42 +416,71 @@ def test_localnet_status_docker_error(app_dir_mock: AppDirs, proc_mock: ProcMock json.dumps( [ { - "ID": "00e93d3db91d964d1b2bcf444c938140dc6b43398380374eaac8510f45381973", + "ID": "e900c9dfe5e4676ca7fb3ac38cbee366ca5429ae447222282b64c059f5727a47", "Name": "algokit_algod", - "Command": "start.sh", + "Image": "algorand/algod:latest", + "Command": "/node/run/run.sh", "Project": "algokit_sandbox", "Service": "algod", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, "Publishers": [ - {"URL": "0.0.0.0", "TargetPort": 4001, "PublishedPort": 4001, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 4002, "PublishedPort": 4002, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}, - ], + {"URL": "", "TargetPort": 4160, "PublishedPort": 0, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, + {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, + {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"} + ] }, { - "ID": "a242581a65f7e49d376bff9fd8d2288cdd85a28a264657d73db84dbeef6155b7", - "Name": "algokit_indexer", - "Command": "/tmp/start.sh", + "ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", + "Name": "algokit_conduit", + "Image": "algorand/conduit:latest", + "Command": "docker-entrypoint.sh", + "Project": "algokit_sandbox", + "Service": "conduit", + "Created": 1701664778, + "State": "running", + "Status": "", + "Health": "", + "ExitCode": 0, + "Publishers": [] + }, + { + "ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", + "Name": "algokit_sandbox-indexer-1", + "Image": "algorand/indexer:latest", + "Command": "docker-entrypoint.sh daemon --enable-all-parameters", "Project": "algokit_sandbox", "Service": "indexer", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [], + "Publishers": [ + {"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"} + ] }, { - "ID": "9e66aca1cd3542446e7b88f0701122a90f388308f7de0b57b6e2d843b3da9026", + "ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", "Name": "algokit_postgres", + "Image": "postgres:13-alpine", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", + "Created": 1701664778, "State": "running", + "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [{"URL": "", "TargetPort": 5432, "PublishedPort": 0, "Protocol": "tcp"}], - }, + "Publishers": [ + {"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"} + ] + } ] ) ], diff --git a/tests/localnet/test_localnet_status.test_localnet_status_docker_error.approved.txt b/tests/localnet/test_localnet_status.test_localnet_status_docker_error.approved.txt index b610e56e..c6299bad 100644 --- a/tests/localnet/test_localnet_status.test_localnet_status_docker_error.approved.txt +++ b/tests/localnet/test_localnet_status.test_localnet_status_docker_error.approved.txt @@ -4,9 +4,12 @@ DEBUG: Running 'docker version' in '{current_working_directory}' DEBUG: docker: STDOUT DEBUG: docker: STDERR DEBUG: Running 'docker compose ps --format json' in '{app_config}/sandbox' -DEBUG: docker: [{"ID": "00e93d3db91d964d1b2bcf444c938140dc6b43398380374eaac8510f45381973", "Name": "algokit_algod", "Command": "start.sh", "Project": "algokit_sandbox", "Service": "algod", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 4001, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 4002, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}]}, {"ID": "a242581a65f7e49d376bff9fd8d2288cdd85a28a264657d73db84dbeef6155b7", "Name": "algokit_indexer", "Command": "/tmp/start.sh", "Project": "algokit_sandbox", "Service": "indexer", "State": "running", "Health": "", "ExitCode": 0, "Publishers": []}, {"ID": "9e66aca1cd3542446e7b88f0701122a90f388308f7de0b57b6e2d843b3da9026", "Name": "algokit_postgres", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "", "TargetPort": 5432, "PublishedPort": 0, "Protocol": "tcp"}]}] +DEBUG: docker: [{"ID": "e900c9dfe5e4676ca7fb3ac38cbee366ca5429ae447222282b64c059f5727a47", "Name": "algokit_algod", "Image": "algorand/algod:latest", "Command": "/node/run/run.sh", "Project": "algokit_sandbox", "Service": "algod", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "", "TargetPort": 4160, "PublishedPort": 0, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}]}, {"ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", "Name": "algokit_conduit", "Image": "algorand/conduit:latest", "Command": "docker-entrypoint.sh", "Project": "algokit_sandbox", "Service": "conduit", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": []}, {"ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", "Name": "algokit_sandbox-indexer-1", "Image": "algorand/indexer:latest", "Command": "docker-entrypoint.sh daemon --enable-all-parameters", "Project": "algokit_sandbox", "Service": "indexer", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"}]}, {"ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", "Name": "algokit_postgres", "Image": "postgres:13-alpine", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"}]}] DEBUG: HTTP Request: GET http://localhost:4001/v2/status "HTTP/1.1 200 OK" DEBUG: HTTP Request: GET http://localhost:4001/versions "HTTP/1.1 200 OK" +DEBUG: Error checking indexer status: No response can be found for GET request on http://localhost:8980/health amongst: +Match all requests on http://localhost:4001/v2/status +Match all requests on http://localhost:4001/versions # algod status Status: Running Port: 4001 @@ -15,8 +18,10 @@ Time since last round: 15.3s Genesis ID: {genesis_id} Genesis hash: {genesis_hash_b64} Version: 1.2.1 -# indexer status -Status: Error +# conduit status +Status: Running # indexer-db status Status: Running +# indexer status +Status: Error Error: At least one container isn't running; execute `algokit localnet start` to start the LocalNet diff --git a/tests/localnet/test_localnet_status.test_localnet_status_http_error.approved.txt b/tests/localnet/test_localnet_status.test_localnet_status_http_error.approved.txt index 2944915a..7031252c 100644 --- a/tests/localnet/test_localnet_status.test_localnet_status_http_error.approved.txt +++ b/tests/localnet/test_localnet_status.test_localnet_status_http_error.approved.txt @@ -4,7 +4,7 @@ DEBUG: Running 'docker version' in '{current_working_directory}' DEBUG: docker: STDOUT DEBUG: docker: STDERR DEBUG: Running 'docker compose ps --format json' in '{app_config}/sandbox' -DEBUG: docker: [{"ID": "00e93d3db91d964d1b2bcf444c938140dc6b43398380374eaac8510f45381973", "Name": "algokit_algod", "Command": "start.sh", "Project": "algokit_sandbox", "Service": "algod", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 4001, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 4002, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}]}, {"ID": "a242581a65f7e49d376bff9fd8d2288cdd85a28a264657d73db84dbeef6155b7", "Name": "algokit_indexer", "Command": "/tmp/start.sh", "Project": "algokit_sandbox", "Service": "indexer", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"}]}, {"ID": "9e66aca1cd3542446e7b88f0701122a90f388308f7de0b57b6e2d843b3da9026", "Name": "algokit_postgres", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "", "TargetPort": 5432, "PublishedPort": 0, "Protocol": "tcp"}]}] +DEBUG: docker: [{"ID": "e900c9dfe5e4676ca7fb3ac38cbee366ca5429ae447222282b64c059f5727a47", "Name": "algokit_algod", "Image": "algorand/algod:latest", "Command": "/node/run/run.sh", "Project": "algokit_sandbox", "Service": "algod", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "", "TargetPort": 4160, "PublishedPort": 0, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}]}, {"ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", "Name": "algokit_conduit", "Image": "algorand/conduit:latest", "Command": "docker-entrypoint.sh", "Project": "algokit_sandbox", "Service": "conduit", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": []}, {"ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", "Name": "algokit_sandbox-indexer-1", "Image": "algorand/indexer:latest", "Command": "docker-entrypoint.sh daemon --enable-all-parameters", "Project": "algokit_sandbox", "Service": "indexer", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"}]}, {"ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", "Name": "algokit_postgres", "Image": "postgres:13-alpine", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"}]}] DEBUG: HTTP Request: GET http://localhost:4001/v2/status "HTTP/1.1 200 OK" DEBUG: HTTP Request: GET http://localhost:4001/versions "HTTP/1.1 200 OK" DEBUG: Error checking indexer status: Unable to read within timeout @@ -16,8 +16,10 @@ Time since last round: 15.3s Genesis ID: {genesis_id} Genesis hash: {genesis_hash_b64} Version: 1.2.1 -# indexer status -Status: Error +# conduit status +Status: Running # indexer-db status Status: Running +# indexer status +Status: Error Error: At least one container isn't running; execute `algokit localnet start` to start the LocalNet diff --git a/tests/localnet/test_localnet_status.test_localnet_status_service_not_started.approved.txt b/tests/localnet/test_localnet_status.test_localnet_status_service_not_started.approved.txt index 2086f430..85abb2cd 100644 --- a/tests/localnet/test_localnet_status.test_localnet_status_service_not_started.approved.txt +++ b/tests/localnet/test_localnet_status.test_localnet_status_service_not_started.approved.txt @@ -4,16 +4,20 @@ DEBUG: Running 'docker version' in '{current_working_directory}' DEBUG: docker: STDOUT DEBUG: docker: STDERR DEBUG: Running 'docker compose ps --format json' in '{app_config}/sandbox' -DEBUG: docker: [{"ID": "00e93d3db91d964d1b2bcf444c938140dc6b43398380374eaac8510f45381973", "Name": "algokit_algod", "Command": "start.sh", "Project": "algokit_sandbox", "Service": "algod", "State": "stopped", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 4001, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 4002, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}]}, {"ID": "a242581a65f7e49d376bff9fd8d2288cdd85a28a264657d73db84dbeef6155b7", "Name": "algokit_indexer", "Command": "/tmp/start.sh", "Project": "algokit_sandbox", "Service": "indexer", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"}]}, {"ID": "9e66aca1cd3542446e7b88f0701122a90f388308f7de0b57b6e2d843b3da9026", "Name": "algokit_postgres", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "", "TargetPort": 5432, "PublishedPort": 0, "Protocol": "tcp"}]}] +DEBUG: docker: [{"ID": "e900c9dfe5e4676ca7fb3ac38cbee366ca5429ae447222282b64c059f5727a47", "Name": "algokit_algod", "Image": "algorand/algod:latest", "Command": "/node/run/run.sh", "Project": "algokit_sandbox", "Service": "algod", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "", "TargetPort": 4160, "PublishedPort": 0, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}]}, {"ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", "Name": "algokit_conduit", "Image": "algorand/conduit:latest", "Command": "docker-entrypoint.sh", "Project": "algokit_sandbox", "Service": "conduit", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": []}, {"ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", "Name": "algokit_sandbox-indexer-1", "Image": "algorand/indexer:latest", "Command": "docker-entrypoint.sh daemon --enable-all-parameters", "Project": "algokit_sandbox", "Service": "indexer", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"}]}, {"ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", "Name": "algokit_postgres", "Image": "postgres:13-alpine", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"}]}] +DEBUG: Error checking algod status: No response can be found for GET request on http://localhost:4001/v2/status amongst: +Match all requests on http://localhost:8980/health DEBUG: HTTP Request: GET http://localhost:8980/health "HTTP/1.1 200 OK" DEBUG: http://localhost:8980/health response: {'round': 1, 'errors': ['error'], 'version': 'v1.0'} # algod status -Status: Not running +Status: Error +# conduit status +Status: Running +# indexer-db status +Status: Running # indexer status Status: Running Port: 8980 Last round: 1 Version: v1.0 -# indexer-db status -Status: Running Error: At least one container isn't running; execute `algokit localnet start` to start the LocalNet diff --git a/tests/localnet/test_localnet_status.test_localnet_status_successful.approved.txt b/tests/localnet/test_localnet_status.test_localnet_status_successful.approved.txt index 654b1062..32af5736 100644 --- a/tests/localnet/test_localnet_status.test_localnet_status_successful.approved.txt +++ b/tests/localnet/test_localnet_status.test_localnet_status_successful.approved.txt @@ -4,7 +4,7 @@ DEBUG: Running 'docker version' in '{current_working_directory}' DEBUG: docker: STDOUT DEBUG: docker: STDERR DEBUG: Running 'docker compose ps --format json' in '{app_config}/sandbox' -DEBUG: docker: [{"ID": "90ce27e631e4d0b048322abd01a9e68e4c899b936ad4e4e3106ad5d9f774a189", "Name": "algokit_algod", "Command": "start.sh", "Project": "algokit_sandbox", "Service": "algod", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 4001, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 4002, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}]}, {"ID": "d3a74173d552ac388643ee65c9c6aa4c1864cb1442d0423d62bd95c468ac4b97", "Name": "algokit_indexer", "Command": "/tmp/start.sh", "Project": "algokit_sandbox", "Service": "indexer", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"}]}, {"ID": "9e66aca1cd3542446e7b88f0701122a90f388308f7de0b57b6e2d843b3da9026", "Name": "algokit_postgres", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "", "TargetPort": 5432, "PublishedPort": 0, "Protocol": "tcp"}]}] +DEBUG: docker: [{"ID": "e900c9dfe5e4676ca7fb3ac38cbee366ca5429ae447222282b64c059f5727a47", "Name": "algokit_algod", "Image": "algorand/algod:latest", "Command": "/node/run/run.sh", "Project": "algokit_sandbox", "Service": "algod", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "", "TargetPort": 4160, "PublishedPort": 0, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}]}, {"ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", "Name": "algokit_conduit", "Image": "algorand/conduit:latest", "Command": "docker-entrypoint.sh", "Project": "algokit_sandbox", "Service": "conduit", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": []}, {"ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", "Name": "algokit_sandbox-indexer-1", "Image": "algorand/indexer:latest", "Command": "docker-entrypoint.sh daemon --enable-all-parameters", "Project": "algokit_sandbox", "Service": "indexer", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"}]}, {"ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", "Name": "algokit_postgres", "Image": "postgres:13-alpine", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"}]}] DEBUG: HTTP Request: GET http://localhost:4001/v2/status "HTTP/1.1 200 OK" DEBUG: HTTP Request: GET http://localhost:4001/versions "HTTP/1.1 200 OK" DEBUG: HTTP Request: GET http://localhost:8980/health "HTTP/1.1 200 OK" @@ -17,10 +17,12 @@ Time since last round: 15.3s Genesis ID: {genesis_id} Genesis hash: {genesis_hash_b64} Version: 1.2.1 +# conduit status +Status: Running +# indexer-db status +Status: Running # indexer status Status: Running Port: 8980 Last round: 1 Version: v1.0 -# indexer-db status -Status: Running diff --git a/tests/localnet/test_localnet_status.test_localnet_status_unexpected_port.approved.txt b/tests/localnet/test_localnet_status.test_localnet_status_unexpected_port.approved.txt index ad626deb..c6299bad 100644 --- a/tests/localnet/test_localnet_status.test_localnet_status_unexpected_port.approved.txt +++ b/tests/localnet/test_localnet_status.test_localnet_status_unexpected_port.approved.txt @@ -4,9 +4,12 @@ DEBUG: Running 'docker version' in '{current_working_directory}' DEBUG: docker: STDOUT DEBUG: docker: STDERR DEBUG: Running 'docker compose ps --format json' in '{app_config}/sandbox' -DEBUG: docker: [{"ID": "00e93d3db91d964d1b2bcf444c938140dc6b43398380374eaac8510f45381973", "Name": "algokit_algod", "Command": "start.sh", "Project": "algokit_sandbox", "Service": "algod", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 4001, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 4002, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}]}, {"ID": "a242581a65f7e49d376bff9fd8d2288cdd85a28a264657d73db84dbeef6155b7", "Name": "algokit_indexer", "Command": "/tmp/start.sh", "Project": "algokit_sandbox", "Service": "indexer", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 1234, "PublishedPort": 1234, "Protocol": "tcp"}]}, {"ID": "9e66aca1cd3542446e7b88f0701122a90f388308f7de0b57b6e2d843b3da9026", "Name": "algokit_postgres", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", "State": "running", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "", "TargetPort": 5432, "PublishedPort": 0, "Protocol": "tcp"}]}] +DEBUG: docker: [{"ID": "e900c9dfe5e4676ca7fb3ac38cbee366ca5429ae447222282b64c059f5727a47", "Name": "algokit_algod", "Image": "algorand/algod:latest", "Command": "/node/run/run.sh", "Project": "algokit_sandbox", "Service": "algod", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "", "TargetPort": 4160, "PublishedPort": 0, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}]}, {"ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", "Name": "algokit_conduit", "Image": "algorand/conduit:latest", "Command": "docker-entrypoint.sh", "Project": "algokit_sandbox", "Service": "conduit", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": []}, {"ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", "Name": "algokit_sandbox-indexer-1", "Image": "algorand/indexer:latest", "Command": "docker-entrypoint.sh daemon --enable-all-parameters", "Project": "algokit_sandbox", "Service": "indexer", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"}]}, {"ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", "Name": "algokit_postgres", "Image": "postgres:13-alpine", "Command": "docker-entrypoint.sh postgres", "Project": "algokit_sandbox", "Service": "indexer-db", "Created": 1701664778, "State": "running", "Status": "", "Health": "", "ExitCode": 0, "Publishers": [{"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"}]}] DEBUG: HTTP Request: GET http://localhost:4001/v2/status "HTTP/1.1 200 OK" DEBUG: HTTP Request: GET http://localhost:4001/versions "HTTP/1.1 200 OK" +DEBUG: Error checking indexer status: No response can be found for GET request on http://localhost:8980/health amongst: +Match all requests on http://localhost:4001/v2/status +Match all requests on http://localhost:4001/versions # algod status Status: Running Port: 4001 @@ -15,8 +18,10 @@ Time since last round: 15.3s Genesis ID: {genesis_id} Genesis hash: {genesis_hash_b64} Version: 1.2.1 -# indexer status -Status: Error +# conduit status +Status: Running # indexer-db status Status: Running +# indexer status +Status: Error Error: At least one container isn't running; execute `algokit localnet start` to start the LocalNet From 07c6c2ef91f53a7a88a3b0140be03ed65aeba4de Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Mon, 4 Dec 2023 16:18:28 +1000 Subject: [PATCH 3/3] chore: fix ruff errors --- tests/localnet/test_localnet_status.py | 60 +++++++++++++------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/localnet/test_localnet_status.py b/tests/localnet/test_localnet_status.py index 746b50de..83937284 100644 --- a/tests/localnet/test_localnet_status.py +++ b/tests/localnet/test_localnet_status.py @@ -51,8 +51,8 @@ def test_localnet_status_successful(app_dir_mock: AppDirs, proc_mock: ProcMock, {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"} - ] + {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}, + ], }, { "ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", @@ -66,7 +66,7 @@ def test_localnet_status_successful(app_dir_mock: AppDirs, proc_mock: ProcMock, "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [] + "Publishers": [], }, { "ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", @@ -82,7 +82,7 @@ def test_localnet_status_successful(app_dir_mock: AppDirs, proc_mock: ProcMock, "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"} - ] + ], }, { "ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", @@ -98,8 +98,8 @@ def test_localnet_status_successful(app_dir_mock: AppDirs, proc_mock: ProcMock, "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"} - ] - } + ], + }, ] ) ], @@ -149,8 +149,8 @@ def test_localnet_status_http_error(app_dir_mock: AppDirs, proc_mock: ProcMock, {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"} - ] + {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}, + ], }, { "ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", @@ -164,7 +164,7 @@ def test_localnet_status_http_error(app_dir_mock: AppDirs, proc_mock: ProcMock, "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [] + "Publishers": [], }, { "ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", @@ -180,7 +180,7 @@ def test_localnet_status_http_error(app_dir_mock: AppDirs, proc_mock: ProcMock, "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"} - ] + ], }, { "ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", @@ -196,8 +196,8 @@ def test_localnet_status_http_error(app_dir_mock: AppDirs, proc_mock: ProcMock, "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"} - ] - } + ], + }, ] ) ], @@ -246,8 +246,8 @@ def test_localnet_status_unexpected_port(app_dir_mock: AppDirs, proc_mock: ProcM {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"} - ] + {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}, + ], }, { "ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", @@ -261,7 +261,7 @@ def test_localnet_status_unexpected_port(app_dir_mock: AppDirs, proc_mock: ProcM "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [] + "Publishers": [], }, { "ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", @@ -277,7 +277,7 @@ def test_localnet_status_unexpected_port(app_dir_mock: AppDirs, proc_mock: ProcM "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"} - ] + ], }, { "ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", @@ -293,8 +293,8 @@ def test_localnet_status_unexpected_port(app_dir_mock: AppDirs, proc_mock: ProcM "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"} - ] - } + ], + }, ] ) ], @@ -335,8 +335,8 @@ def test_localnet_status_service_not_started(app_dir_mock: AppDirs, proc_mock: P {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"} - ] + {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}, + ], }, { "ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", @@ -350,7 +350,7 @@ def test_localnet_status_service_not_started(app_dir_mock: AppDirs, proc_mock: P "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [] + "Publishers": [], }, { "ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", @@ -366,7 +366,7 @@ def test_localnet_status_service_not_started(app_dir_mock: AppDirs, proc_mock: P "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"} - ] + ], }, { "ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", @@ -382,8 +382,8 @@ def test_localnet_status_service_not_started(app_dir_mock: AppDirs, proc_mock: P "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"} - ] - } + ], + }, ] ) ], @@ -432,8 +432,8 @@ def test_localnet_status_docker_error(app_dir_mock: AppDirs, proc_mock: ProcMock {"URL": "0.0.0.0", "TargetPort": 7833, "PublishedPort": 4002, "Protocol": "tcp"}, {"URL": "0.0.0.0", "TargetPort": 8080, "PublishedPort": 4001, "Protocol": "tcp"}, {"URL": "", "TargetPort": 9100, "PublishedPort": 0, "Protocol": "tcp"}, - {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"} - ] + {"URL": "0.0.0.0", "TargetPort": 9392, "PublishedPort": 9392, "Protocol": "tcp"}, + ], }, { "ID": "2ba986bf8539527dbc1f2c3e9d8f83e834099ffea30d31f341691b172748464f", @@ -447,7 +447,7 @@ def test_localnet_status_docker_error(app_dir_mock: AppDirs, proc_mock: ProcMock "Status": "", "Health": "", "ExitCode": 0, - "Publishers": [] + "Publishers": [], }, { "ID": "fa5b36dddbd112eb8b52ccd4de7db47c55ad49124b0483896a23f6727335cb3d", @@ -463,7 +463,7 @@ def test_localnet_status_docker_error(app_dir_mock: AppDirs, proc_mock: ProcMock "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 8980, "PublishedPort": 8980, "Protocol": "tcp"} - ] + ], }, { "ID": "f3a0bf6fe1e1fcbff96b88f39e30bcadab4c1792234c970d654b7a34fb71e1d7", @@ -479,8 +479,8 @@ def test_localnet_status_docker_error(app_dir_mock: AppDirs, proc_mock: ProcMock "ExitCode": 0, "Publishers": [ {"URL": "0.0.0.0", "TargetPort": 5432, "PublishedPort": 5443, "Protocol": "tcp"} - ] - } + ], + }, ] ) ],