This commit is contained in:
@@ -151,6 +151,15 @@ def test_runtime_copies_options_without_a_host_bind_mount() -> None:
|
||||
assert "--mount" not in runtime_test
|
||||
|
||||
|
||||
def test_runtime_probes_service_inside_container_network_namespace() -> None:
|
||||
runtime_test = (ROOT / "tests/test_runtime.sh").read_text(encoding="utf-8")
|
||||
assert 'probe_root "$container"' in runtime_test
|
||||
assert 'post_invalid_worker "$first_container"' in runtime_test
|
||||
assert 'assert_8080_loopback_mapping "$first_container"' in runtime_test
|
||||
assert 'assert_8080_loopback_mapping "$second_container"' in runtime_test
|
||||
assert 'f"http://127.0.0.1:{sys.argv[1]}/"' not in runtime_test
|
||||
|
||||
|
||||
def test_ci_builds_and_loads_only_the_amd64_test_image() -> None:
|
||||
workflow = (ROOT / ".gitea/workflows/ci.yml").read_text(encoding="utf-8")
|
||||
parsed = yaml.safe_load(workflow)
|
||||
@@ -253,9 +262,10 @@ def test_runtime_requires_process_baseline_after_cdp_close_and_zero_stopped_pid(
|
||||
baseline = (
|
||||
f'{prefix}_baseline="$(capture_process_baseline "{container}")"'
|
||||
)
|
||||
ready_index = runtime_test.index(
|
||||
f'wait_ready "{container}" "${prefix}_port"'
|
||||
mapping_index = runtime_test.index(
|
||||
f'assert_8080_loopback_mapping "{container}"'
|
||||
)
|
||||
ready_index = runtime_test.index(f'wait_ready "{container}"')
|
||||
baseline_index = runtime_test.index(baseline)
|
||||
close_index = runtime_test.index(
|
||||
f'probe_and_close_cdp "{container}"', baseline_index
|
||||
@@ -264,7 +274,7 @@ def test_runtime_requires_process_baseline_after_cdp_close_and_zero_stopped_pid(
|
||||
f'assert_processes_return_to_baseline "{container}" "${prefix}_baseline"',
|
||||
close_index,
|
||||
)
|
||||
assert ready_index < baseline_index < close_index < return_index
|
||||
assert mapping_index < ready_index < baseline_index < close_index < return_index
|
||||
assert "{{.State.Pid}}" in runtime_test
|
||||
assert '[ "$state" = "exited 0 0" ]' in runtime_test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user