mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
* "allow" (don't try to drop) linux capabilities in the docker test driver harness (see #15181) * refactor to allow different busybox images since windows containers need to be the same version as the underlying OS, and we're moving from 2016 to 2019 * one docker test was flaky from apparently being a bit slower on windows, so add Wait()
31 lines
699 B
Go
31 lines
699 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
//go:build windows
|
|
|
|
package docker
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/nomad/client/allocdir"
|
|
"github.com/hashicorp/nomad/testutil"
|
|
)
|
|
|
|
func newTaskConfig(variant string, command []string) TaskConfig {
|
|
// busyboxImageID is an id of an image containing nanoserver windows and
|
|
// a busybox exe.
|
|
busyboxImageID := testutil.TestBusyboxImage()
|
|
|
|
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) {
|
|
}
|