fix tests

This commit is contained in:
anlicheng 2026-04-23 11:23:37 +08:00
parent 6f4f62150c
commit da1136f888

View File

@ -32,7 +32,8 @@
test_get_containers/0 test_get_containers/0
]). ]).
-define(TEST_IMAGE, <<"docker.1ms.run/library/busybox:latest">>). -define(TEST_IMAGE, <<"docker.1ms.run/library/nginx:latest">>).
-define(TEST_CMD, [<<"nginx">>, <<"-g">>, <<"daemon off;">>]).
-spec test_all() -> ok. -spec test_all() -> ok.
test_all() -> test_all() ->
@ -99,7 +100,7 @@ test_create_container_patches_options() ->
create = #'DockerCreateOptions'{ create = #'DockerCreateOptions'{
config = #'DockerContainerConfig'{ config = #'DockerContainerConfig'{
image = ?TEST_IMAGE, image = ?TEST_IMAGE,
cmd = [<<"sleep">>, <<"300">>], cmd = ?TEST_CMD,
env = [<<"EXISTING_ENV=1">>], env = [<<"EXISTING_ENV=1">>],
volumes = [<<"/data">>] volumes = [<<"/data">>]
}, },
@ -261,7 +262,7 @@ minimal_params(Name) when is_binary(Name) ->
create = #'DockerCreateOptions'{ create = #'DockerCreateOptions'{
config = #'DockerContainerConfig'{ config = #'DockerContainerConfig'{
image = ?TEST_IMAGE, image = ?TEST_IMAGE,
cmd = [<<"sleep">>, <<"300">>] cmd = ?TEST_CMD
} }
} }
}. }.