1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/integration/container
Sebastiaan van Stijn 0bce64f08d
api: POST /containers/{id}/wait: fix validation for "condition" parameter
commit 737e8c6ab8 added validation for the wait
condition parameter, however, the default ("not-running") option was not part
of the list of valid options, resulting in a regression if the default value
was explicitly passed;

    docker scan --accept-license --version
    Error response from daemon: invalid condition: "not-running"

This patch adds the missing option, and adds a test to verify.

With this patch;

    make BIND_DIR=. DOCKER_GRAPHDRIVER=vfs TEST_FILTER=TestWaitConditions test-integration
    ...
    --- PASS: TestWaitConditions (0.04s)
    --- PASS: TestWaitConditions/removed (1.79s)
    --- PASS: TestWaitConditions/default (1.91s)
    --- PASS: TestWaitConditions/next-exit (1.97s)
    --- PASS: TestWaitConditions/not-running (1.99s)
    PASS

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-27 14:45:32 +02:00
..
attach_test.go Make it explicit raw|multiplexed stream implementation being used 2022-05-12 11:36:31 +02:00
checkpoint_test.go unused: ignore false positives 2021-06-10 13:03:32 +02:00
container_test.go runconfig: ContainerDecoder(): fix handling of invalid JSON 2022-04-11 21:44:45 +02:00
copy_test.go client: CopyToContainer(), CopyFromContainer(): remove status-code handling 2022-04-19 08:28:20 +02:00
create_test.go Fix validation of IpcMode, PidMode, UTSMode, CgroupnsMode 2022-05-25 17:41:51 +02:00
daemon_linux_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
daemon_test.go
devices_windows_test.go Suport vpci-class-guid in the non-containerd backend 2022-03-27 13:26:47 +11:00
diff_test.go
exec_linux_test.go container/exec: Support ConsoleSize 2022-06-24 11:54:25 +02:00
exec_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
export_test.go
health_test.go Fix racey TestHealthKillContainer 2021-10-21 19:27:07 +00:00
inspect_test.go
ipcmode_linux_test.go Merge pull request #40084 from thaJeztah/hostconfig_const_cleanup 2021-08-28 00:21:31 +09:00
kill_test.go vendor: github.com/moby/sys/mount v0.3.0, mountinfo v0.5.0, signal v0.6.0, symlink v0.2.0 2021-11-19 09:56:37 +01:00
links_linux_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
logs_test.go test: Add tests for logging 2022-06-10 09:26:17 +02:00
main_test.go
mounts_linux_test.go
nat_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
pause_test.go client: ContainerStop(), ContainerRestart(): support stop-signal 2022-04-20 21:29:34 +02:00
pidmode_linux_test.go
ps_test.go
remove_test.go
rename_test.go client: ContainerStop(), ContainerRestart(): support stop-signal 2022-04-20 21:29:34 +02:00
resize_test.go Prepare tests for Windows containerd support 2021-04-22 10:50:00 +03:00
restart_test.go Fixes #41871: Update daemon/daemon.go: resume healthcheck on restore 2021-10-07 21:23:27 +02:00
run_cgroupns_linux_test.go
run_linux_test.go container/exec: Support ConsoleSize 2022-06-24 11:54:25 +02:00
stats_test.go
stop_linux_test.go client: ContainerStop(), ContainerRestart(): support stop-signal 2022-04-20 21:29:34 +02:00
stop_test.go client: ContainerStop(), ContainerRestart(): support stop-signal 2022-04-20 21:29:34 +02:00
stop_windows_test.go client: ContainerStop(), ContainerRestart(): support stop-signal 2022-04-20 21:29:34 +02:00
update_linux_test.go
update_test.go
wait_test.go api: POST /containers/{id}/wait: fix validation for "condition" parameter 2022-06-27 14:45:32 +02:00