mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
27ba755f70
Before this change if you assume that things work the way the test expects them to (it does not, but lets assume for now) we aren't really testing anything because we are testing that a container is healthy before and after we send a signal. This will give false positives even if there is a bug in the underlying code. Sending a signal can take any amount of time to cause a container to exit or to trigger healthchecks to stop or whatever. Now lets remove the assumption that things are working as expected, because they are not. In this case, `top` (which is what is running in the container) is actually exiting when it receives `USR1`. This totally invalidates the test. We need more control and knowledge as to what is happening in the container to properly test this. This change introduces a custom script which traps `USR1` and flips the health status each time the signal is received. We then send the signal twice so that we know the change has occurred and check that the value has flipped so that we know the change has actually occurred. Signed-off-by: Brian Goff <cpuguy83@gmail.com> |
||
---|---|---|
.. | ||
checkpoint_test.go | ||
container_test.go | ||
copy_test.go | ||
create_test.go | ||
daemon_linux_test.go | ||
daemon_test.go | ||
diff_test.go | ||
exec_test.go | ||
export_test.go | ||
health_test.go | ||
inspect_test.go | ||
ipcmode_linux_test.go | ||
kill_test.go | ||
links_linux_test.go | ||
logs_test.go | ||
main_test.go | ||
mounts_linux_test.go | ||
nat_test.go | ||
pause_test.go | ||
pidmode_linux_test.go | ||
ps_test.go | ||
remove_test.go | ||
rename_test.go | ||
resize_test.go | ||
restart_test.go | ||
run_cgroupns_linux_test.go | ||
run_linux_test.go | ||
stats_test.go | ||
stop_linux_test.go | ||
stop_test.go | ||
stop_windows_test.go | ||
update_linux_test.go | ||
update_test.go | ||
wait_test.go |