diff --git a/tests/btest/btest.cfg b/tests/btest/btest.cfg index 7fd72c4e..f9fe8684 100644 --- a/tests/btest/btest.cfg +++ b/tests/btest/btest.cfg @@ -1,5 +1,5 @@ [btest] -TestDirs = web-socket handshake store endpoint http-status +TestDirs = web-socket handshake store endpoint TmpDir = %(testbase)s/.tmp BaselineDir = %(testbase)s/Baseline MinVersion = 0.63 diff --git a/tests/btest/http-status/multi-node.py b/tests/btest/http-status/multi-node.py deleted file mode 100644 index 2638b8a7..00000000 --- a/tests/btest/http-status/multi-node.py +++ /dev/null @@ -1,63 +0,0 @@ -# Like `single-node` but peers with another node and attaches master and clone -# stores. -# -# Note: waiting for '"master-id": "36762b90-d415-4ada-bb6a-eff33f34836b"' makes -# sure that the clone has found its master store. -# -# @TEST-GROUP: http-status -# -# @TEST-PORT: PEERING_PORT -# @TEST-PORT: HTTP_PORT -# -# @TEST-EXEC: btest-bg-run node1 "broker-node --config-file=../node1.cfg -p $PEERING_PORT --broker.metrics.port=$HTTP_PORT" -# @TEST-EXEC: btest-bg-run node2 "broker-node --config-file=../node2.cfg --peers=''" -# @TEST-EXEC: $SCRIPTS/wait-for-http $HTTP_PORT v1/status/json 30 '@awaited-keys.txt' || (btest-bg-wait -k 1 && false) -# @TEST-EXEC: $SCRIPTS/read-http $HTTP_PORT v1/status/json response.json -# @TEST-EXEC: python3 $SCRIPTS/extract-json-keys.py response.json > keys.json -# @TEST-EXEC: btest-diff keys.json - -# Configure our broker with verbose output in order to have some artifacts to -# look at when things go wrong. -@TEST-START-FILE node1.cfg - -caf { - logger { - file { - path = 'broker.log' - verbosity = 'debug' - - } - } -} -master-stores = ["my-store-1", "my-store-2"] -clone-stores = ["my-store-3"] -topics = ["/test"] -verbose = true -endpoint-id = "d207546e-7780-48f4-bfdf-f47f3c789dc6" - -@TEST-END-FILE - -@TEST-START-FILE node2.cfg - -caf { - logger { - file { - path = 'broker.log' - verbosity = 'debug' - } - } -} -master-stores = ["my-store-3"] -clone-stores = ["my-store-1", "my-store-2"] -topics = ["/test"] -verbose = true -endpoint-id = "36762b90-d415-4ada-bb6a-eff33f34836b" - -@TEST-END-FILE - -# A list of keys that must appear after the nodes have connected their stores. -@TEST-START-FILE awaited-keys.txt -clones.my-store-3.master-id -masters.my-store-1.inputs.36762b90-d415-4ada-bb6a-eff33f34836b -masters.my-store-2.inputs.36762b90-d415-4ada-bb6a-eff33f34836b -@TEST-END-FILE diff --git a/tests/btest/http-status/single-node.py b/tests/btest/http-status/single-node.py deleted file mode 100644 index 4343fc67..00000000 --- a/tests/btest/http-status/single-node.py +++ /dev/null @@ -1,58 +0,0 @@ -# High-level test that checks whether Broker responds with JSON output on its -# metrics port for the path /v1/status/json. The baseline checks against the -# keys in the dictionary. This test only has a single node without any stores -# attached. -# -# @TEST-GROUP: http-status -# -# @TEST-PORT: BROKER_PORT -# @TEST-PORT: BROKER_METRICS_PORT -# -# @TEST-EXEC: btest-bg-run node "broker-node --config-file=../node.cfg" -# @TEST-EXEC: $SCRIPTS/wait-for-http $BROKER_METRICS_PORT v1/status/json 30 || (btest-bg-wait -k 1 && false) -# @TEST-EXEC: $SCRIPTS/read-http $BROKER_METRICS_PORT v1/status/json response.json -# @TEST-EXEC: python3 extract-keys.py > keys.json -# @TEST-EXEC: btest-diff keys.json - -# Configure our broker with verbose output in order to have some artifacts to -# look at when things go wrong. -@TEST-START-FILE node.cfg - -caf { - logger { - file { - path = 'broker.log' - verbosity = 'debug' - } - } -} -topics = ["/test"] -verbose = true - -@TEST-END-FILE - -# Extracts all keys from a JSON file, sorts and prints them. -@TEST-START-FILE extract-keys.py - -import json - -keys = [] - -def rec_scan_keys(xs, prefix): - for key, val in xs.items(): - if not prefix: - full_key = key - else: - full_key = '{}.{}'.format(prefix, key) - keys.append(full_key) - if type(val) is dict: - rec_scan_keys(val, full_key) - -with open('response.json') as f: - data = json.load(f) - rec_scan_keys(data, None) - keys.sort() - for key in keys: - print(key) - -@TEST-END-FILE