test: prove native reconnect recovery
This commit is contained in:
@@ -32,6 +32,7 @@ services:
|
||||
- "${RVBOX_NATIVE_RUNTIME_DIR}/pki:/pki"
|
||||
- ./certgen.sh:/fixture/certgen.sh:ro
|
||||
entrypoint: ["/bin/sh", "/fixture/certgen.sh"]
|
||||
networks: [native]
|
||||
networks:
|
||||
native:
|
||||
labels: { rvbox.native.run_id: "${RVBOX_NATIVE_RUN_ID}" }
|
||||
|
||||
@@ -31,6 +31,8 @@ func TestNativeFixtureAssets_HP_HARNESS_20(t *testing.T) {
|
||||
"assert_stdin_close",
|
||||
"assert_signal_term",
|
||||
"rvc kill TERM \"$client_id\" \"$issue\"",
|
||||
"assert_server_restart_reconnect",
|
||||
"compose restart server",
|
||||
"rvc append \"$client_id\" \"$issue\" RVBOX_NATIVE_INPUT",
|
||||
"rvc close-stdin \"$client_id\" \"$issue\"",
|
||||
"clean --purge --yes",
|
||||
@@ -42,13 +44,13 @@ func TestNativeFixtureAssets_HP_HARNESS_20(t *testing.T) {
|
||||
}
|
||||
}
|
||||
testHost := read("scripts/windows/test-host")
|
||||
for _, required := range []string{"xz -T0 -3", "accelerated_stage", "copy_stage_file", "--proxy", "--anyauth", "--continue-at", "rvbox.exe.xz", "retry_limit=4", "ConnectTimeout=10", "bundle transfer did not reach the expected SHA-256 manifest", "verified transfer_sha256", "reset-force-poweroff", "$run_root/.accelerated-stage.XXXXXX"} {
|
||||
for _, required := range []string{"xz -T0 -3", "accelerated_stage", "copy_stage_file", "--proxy", "--anyauth", "--continue-at", "rvbox.exe.xz", "retry_limit=4", "ConnectTimeout=10", "bundle transfer did not reach the expected SHA-256 manifest", "verified transfer_sha256", "reset-force-poweroff", "$run_root/.accelerated-stage.XXXXXX", "service-startup.log", "test-logs/rvbox.log"} {
|
||||
if !strings.Contains(testHost, required) {
|
||||
t.Fatalf("native test-host is missing compressed transfer contract %q", required)
|
||||
}
|
||||
}
|
||||
compose := read("test/linux-server/compose.yaml")
|
||||
for _, required := range []string{"../../bin/rvbox-server", "nginx:1.27-alpine", "rvbox.native.run_id", "RVBOX_NATIVE_RUNTIME_DIR"} {
|
||||
for _, required := range []string{"../../bin/rvbox-server", "nginx:1.27-alpine", "rvbox.native.run_id", "RVBOX_NATIVE_RUNTIME_DIR", "certgen", "networks: [native]"} {
|
||||
if !strings.Contains(compose, required) {
|
||||
t.Fatalf("native Compose fixture is missing %q", required)
|
||||
}
|
||||
@@ -58,6 +60,16 @@ func TestNativeFixtureAssets_HP_HARNESS_20(t *testing.T) {
|
||||
if !strings.Contains(defaults, "//go:build !rvbox_native_test") || !strings.Contains(fixture, "//go:build rvbox_native_test") {
|
||||
t.Fatal("fixture-only context faults are not separated from release builds")
|
||||
}
|
||||
service := read("cmd/rvbox/service_windows.go")
|
||||
if !strings.Contains(service, "applyServiceDiagnosticsACL") || !strings.Contains(service, "D:P(A;;FA;;;SY)(A;;FA;;;BA)") {
|
||||
t.Fatal("Windows service diagnostics are not readable by administrators")
|
||||
}
|
||||
testing := read("docs/testing.md")
|
||||
for _, required := range []string{"server-process\nrestart", "new reconciled WSS session", "`logs` is the narrow read-only"} {
|
||||
if !strings.Contains(testing, required) {
|
||||
t.Fatalf("native workflow documentation is missing %q", required)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestProductionComposeAssets_HP_OPS_01 guards the deployment properties that
|
||||
|
||||
Reference in New Issue
Block a user