fix(worker): accept omitted empty image command
This commit is contained in:
@@ -574,7 +574,11 @@ function Assert-ImageContract {
|
|||||||
[string]::Join([char]0, @("python3", "-m", "k1link.observatory.m49_worker_container_main"))) {
|
[string]::Join([char]0, @("python3", "-m", "k1link.observatory.m49_worker_container_main"))) {
|
||||||
throw "Worker 006 installed image entrypoint changed"
|
throw "Worker 006 installed image entrypoint changed"
|
||||||
}
|
}
|
||||||
if (@($Image.Config.Cmd).Count -ne 0) {
|
$commandProperty = $Image.Config.PSObject.Properties["Cmd"]
|
||||||
|
if (
|
||||||
|
$null -ne $commandProperty -and
|
||||||
|
@($commandProperty.Value).Count -ne 0
|
||||||
|
) {
|
||||||
throw "Worker 006 installed image command changed"
|
throw "Worker 006 installed image command changed"
|
||||||
}
|
}
|
||||||
if ([string]$Image.Config.User -cne "0:0") {
|
if ([string]$Image.Config.User -cne "0:0") {
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ def test_worker_agent_installer_is_local_offline_and_non_buildkit() -> None:
|
|||||||
"\\\"k1link.observatory.m49_worker_container_main\\\"]'"
|
"\\\"k1link.observatory.m49_worker_container_main\\\"]'"
|
||||||
) in script
|
) in script
|
||||||
assert 'title="NODE.DC Observatory Worker 006 agent"' not in script
|
assert 'title="NODE.DC Observatory Worker 006 agent"' not in script
|
||||||
|
assert '$Image.Config.PSObject.Properties["Cmd"]' in script
|
||||||
|
assert "$null -ne $commandProperty" in script
|
||||||
|
assert "@($commandProperty.Value).Count -ne 0" in script
|
||||||
assert "docker rm -f $containerId" in script
|
assert "docker rm -f $containerId" in script
|
||||||
assert "docker rm -f $containerName" not in script
|
assert "docker rm -f $containerName" not in script
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user