test: allow skipping nested local service probes
This commit is contained in:
parent
30fcfce103
commit
c148c1b36b
@ -11,6 +11,7 @@ if [[ -z "${UCE_CLI_SOCKET:-}" && -r /etc/uce/settings.cfg ]]; then
|
||||
fi
|
||||
|
||||
include_kill=0
|
||||
skip_local_service_pages=0
|
||||
action="run"
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
@ -18,13 +19,17 @@ while [[ $# -gt 0 ]]; do
|
||||
include_kill=1
|
||||
shift
|
||||
;;
|
||||
--skip-local-service-pages)
|
||||
skip_local_service_pages=1
|
||||
shift
|
||||
;;
|
||||
--list)
|
||||
action="list"
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
cat <<'USAGE'
|
||||
Usage: scripts/run_cli_tests.sh [--include-wasm-kill] [--list]
|
||||
Usage: scripts/run_cli_tests.sh [--include-wasm-kill] [--skip-local-service-pages] [--list]
|
||||
|
||||
Runs the UCE unit-based test suite through the runtime CLI socket.
|
||||
USAGE
|
||||
@ -42,5 +47,5 @@ if [[ ! -S "$socket_path" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
url="http://localhost/tests/cli_runner.uce?action=${action}&include_kill=${include_kill}"
|
||||
url="http://localhost/tests/cli_runner.uce?action=${action}&include_kill=${include_kill}&skip_local_service_pages=${skip_local_service_pages}"
|
||||
exec curl -sS --fail-with-body --unix-socket "$socket_path" "$url"
|
||||
|
||||
@ -272,7 +272,7 @@ bool cli_site_body_reports_failure(String lower)
|
||||
return(cli_contains(lower, ">failed 1") || cli_contains(lower, ">failed 2") || cli_contains(lower, ">failed 3") || cli_contains(lower, ">failed 4") || cli_contains(lower, ">failed 5") || cli_contains(lower, ">failed 6") || cli_contains(lower, ">failed 7") || cli_contains(lower, ">failed 8") || cli_contains(lower, ">failed 9"));
|
||||
}
|
||||
|
||||
void cli_run_site_suite()
|
||||
void cli_run_site_suite(bool skip_local_service_pages = false)
|
||||
{
|
||||
DValue manifest;
|
||||
for(String line : split(file_get_contents("manifest.txt"), "\n"))
|
||||
@ -284,6 +284,11 @@ void cli_run_site_suite()
|
||||
if(parts.size() < 7 || trim(parts[5]) != "1")
|
||||
continue;
|
||||
String file = trim(parts[0]);
|
||||
if(skip_local_service_pages && (file == "io.uce" || file == "services.uce"))
|
||||
{
|
||||
cli_test_skip(String("uce_site_suite:site tests ") + (file == "io.uce" ? "filesystem" : "services"), "skipped local nested self-HTTP service probe pages for this environment");
|
||||
continue;
|
||||
}
|
||||
String title = trim(parts[1]);
|
||||
String expected = first(trim(parts[4]), title);
|
||||
CliHttpResponse res;
|
||||
@ -422,7 +427,7 @@ CLI(Request& context)
|
||||
cli_run_http_smoke();
|
||||
print("[GROUP] http ", std::to_string((u64)((time_precise() - group_start) * 1000)), " ms\n");
|
||||
group_start = time_precise();
|
||||
cli_run_site_suite();
|
||||
cli_run_site_suite(input["skip_local_service_pages"].to_bool());
|
||||
print("[GROUP] site ", std::to_string((u64)((time_precise() - group_start) * 1000)), " ms\n");
|
||||
group_start = time_precise();
|
||||
cli_run_doc_pages_gate();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user