open-nomad/drivers/docker/driver_windows_test.go
James Rasell bc42cd2e5e
driver/docker: allow configurable pull context timeout setting.
Pulling large docker containers can take longer than the default
context timeout. Without a way to change this it is very hard for
users to utilise Nomad properly without hacky work arounds.

This change adds an optional pull_timeout config parameter which
gives operators the possibility to account for increase pull times
where needed. The infra docker image also has the option to set a
custom timeout to keep consistency.
2020-08-12 08:58:07 +01:00

27 lines
609 B
Go

// +build windows
package docker
import (
"testing"
"github.com/hashicorp/nomad/client/allocdir"
)
func newTaskConfig(variant string, command []string) TaskConfig {
// busyboxImageID is an id of an image containing nanoserver windows and
// a busybox exe.
busyboxImageID := "hashicorpnomad/busybox-windows:server2016-0.1"
return TaskConfig{
Image: busyboxImageID,
ImagePullTimeout: "5m",
Command: command[0],
Args: command[1:],
}
}
// No-op on windows because we don't load images.
func copyImage(t *testing.T, taskDir *allocdir.TaskDir, image string) {
}