ci: move docker unix-y test

Fix AppVeyor failing builds, by moving docker image url test to run on unix
systems only.  The used paused image is a linux image only, not
available on Windows.
This commit is contained in:
Mahmood Ali
2019-04-09 19:59:58 -04:00
parent 79132127b9
commit 43faf1176c
2 changed files with 28 additions and 28 deletions

View File

@@ -506,34 +506,6 @@ func TestDockerDriver_Start_LoadImage(t *testing.T) {
}
// Tests that images prefixed with "https://" are supported
func TestDockerDriver_Start_Image_HTTPS(t *testing.T) {
if !tu.IsCI() {
t.Parallel()
}
testutil.DockerCompatible(t)
taskCfg := TaskConfig{
Image: "https://gcr.io/google_containers/pause:0.8.0",
}
task := &drivers.TaskConfig{
ID: uuid.Generate(),
Name: "pause",
AllocID: uuid.Generate(),
Resources: basicResources,
}
require.NoError(t, task.EncodeConcreteDriverConfig(&taskCfg))
d := dockerDriverHarness(t, nil)
cleanup := d.MkAllocDir(task, true)
defer cleanup()
_, _, err := d.StartTask(task)
require.NoError(t, err)
d.DestroyTask(task.ID, true)
}
// Tests that starting a task without an image fails
func TestDockerDriver_Start_NoImage(t *testing.T) {
if !tu.IsCI() {

View File

@@ -686,6 +686,34 @@ func TestDockerDriver_Cleanup(t *testing.T) {
require.NoError(t, driver.Impl().(*Driver).cleanupImage(handle))
}
// Tests that images prefixed with "https://" are supported
func TestDockerDriver_Start_Image_HTTPS(t *testing.T) {
if !tu.IsCI() {
t.Parallel()
}
testutil.DockerCompatible(t)
taskCfg := TaskConfig{
Image: "https://gcr.io/google_containers/pause:0.8.0",
}
task := &drivers.TaskConfig{
ID: uuid.Generate(),
Name: "pause",
AllocID: uuid.Generate(),
Resources: basicResources,
}
require.NoError(t, task.EncodeConcreteDriverConfig(&taskCfg))
d := dockerDriverHarness(t, nil)
cleanup := d.MkAllocDir(task, true)
defer cleanup()
_, _, err := d.StartTask(task)
require.NoError(t, err)
d.DestroyTask(task.ID, true)
}
func newTaskConfig(variant string, command []string) TaskConfig {
// busyboxImageID is the ID stored in busybox.tar
busyboxImageID := "busybox:1.29.3"