Add OPENWRT_AFTER_BOOT_CMD test

This commit is contained in:
Albrecht Lohofener
2025-01-09 15:51:18 +01:00
parent 40c16e9794
commit c8e190a7f7
+14 -1
View File
@@ -488,4 +488,17 @@ def test_port_8022_ssh(docker_services):
stderr=subprocess.STDOUT,
universal_newlines=True)
assert ('OpenWrt' in process.stdout) == True
assert ('OpenWrt' in process.stdout) == True
@pytest.mark.parametrize("parameter",
[('OPENWRT_AFTER_BOOT_CMD','a=$$((1+1));echo The result of 1+1 is $${a}')], indirect=True,
ids=['OPENWRT_AFTER_BOOT_CMD="a=$$((1+1));echo The result of 1+1 is $${a}"'])
def test_openwrt_after_boot_cmd(docker_services):
wait_for_specific_log(docker_services, 'Detected OpenWrt is booted')
wait_for_specific_log(docker_services, 'Command "a=$((1+1));echo The result of 1+1 is ${a}" exit successfully')
logs = get_logs()
assert ('The result of 1+1 is 2' in logs) == True