moby/integration-cli/test_vars_test.go
Sebastiaan van Stijn 76d8bfdff4
testutil/environment: remove Execution.OSType field
This field was added in f0e5b3d7d8 to
account for older versions of the engine (Docker EE LTS versions), which
did not yet provide the OSType field in Docker info, and had to be manually
set using the TEST_OSTYPE env-var.

This patch removes the field in favor of the equivalent in DaemonInfo. It's
more verbose, but also less ambiguous what information we're using (i.e.,
the platform the daemon is running on, not the local platform).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-26 11:18:09 +02:00

11 lines
378 B
Go

package main
// sleepCommandForDaemonPlatform is a helper function that determines what
// the command is for a sleeping container based on the daemon platform.
// The Windows busybox image does not have a `top` command.
func sleepCommandForDaemonPlatform() []string {
if testEnv.DaemonInfo.OSType == "windows" {
return []string{"sleep", "240"}
}
return []string{"top"}
}