mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-18 08:01:34 +00:00
Add OPENWRT_AFTER_BOOT_CMD test
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user