2021-10-01 13:59:55 +00:00
|
|
|
//go:build windows
|
2019-01-11 13:28:40 +00:00
|
|
|
|
|
|
|
package docker
|
|
|
|
|
|
|
|
import (
|
2019-01-14 12:34:24 +00:00
|
|
|
"testing"
|
2019-01-11 13:28:40 +00:00
|
|
|
|
|
|
|
"github.com/hashicorp/nomad/client/allocdir"
|
2020-11-02 14:28:02 +00:00
|
|
|
tu "github.com/hashicorp/nomad/testutil"
|
2019-01-11 13:28:40 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func newTaskConfig(variant string, command []string) TaskConfig {
|
2019-01-14 13:17:41 +00:00
|
|
|
// busyboxImageID is an id of an image containing nanoserver windows and
|
2019-01-11 13:28:40 +00:00
|
|
|
// a busybox exe.
|
2022-06-08 19:06:00 +00:00
|
|
|
busyboxImageID := "hashicorpdev/busybox-windows:server2016-0.1"
|
2019-01-11 13:28:40 +00:00
|
|
|
|
2020-11-02 14:28:02 +00:00
|
|
|
if tu.IsCI() {
|
|
|
|
// In CI, use HashiCorp Mirror to avoid DockerHub rate limiting
|
|
|
|
busyboxImageID = "docker.mirror.hashicorp.services/" + busyboxImageID
|
|
|
|
}
|
|
|
|
|
2019-01-11 13:28:40 +00:00
|
|
|
return TaskConfig{
|
2020-08-12 07:58:07 +00:00
|
|
|
Image: busyboxImageID,
|
|
|
|
ImagePullTimeout: "5m",
|
|
|
|
Command: command[0],
|
|
|
|
Args: command[1:],
|
2019-01-11 13:28:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-16 14:06:39 +00:00
|
|
|
// No-op on windows because we don't load images.
|
2019-01-14 12:34:24 +00:00
|
|
|
func copyImage(t *testing.T, taskDir *allocdir.TaskDir, image string) {
|
2019-01-11 13:28:40 +00:00
|
|
|
}
|