mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
chore: Fix docklog linting
This commit is contained in:
@@ -3,6 +3,7 @@ package docklog
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
docker "github.com/fsouza/go-dockerclient"
|
||||
@@ -13,12 +14,24 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
func testContainerDetails() (string, string, string) {
|
||||
if runtime.GOOS == "windows" {
|
||||
return "dantoml/busybox-windows:08012019",
|
||||
"dantoml/busybox-windows",
|
||||
"08012019"
|
||||
}
|
||||
|
||||
return "busybox:1", "busybox", "1"
|
||||
}
|
||||
|
||||
func TestDockerLogger(t *testing.T) {
|
||||
ctu.DockerCompatible(t)
|
||||
|
||||
t.Parallel()
|
||||
require := require.New(t)
|
||||
|
||||
containerImage, containerImageName, containerImageTag := testContainerDetails()
|
||||
|
||||
client, err := docker.NewClientFromEnv()
|
||||
if err != nil {
|
||||
t.Skip("docker unavailable:", err)
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
package docklog
|
||||
|
||||
var (
|
||||
containerImage = "busybox:1"
|
||||
containerImageName = "busybox"
|
||||
containerImageTag = "1"
|
||||
)
|
||||
@@ -1,9 +0,0 @@
|
||||
// +build windows
|
||||
|
||||
package docklog
|
||||
|
||||
var (
|
||||
containerImage = "dantoml/busybox-windows:08012019"
|
||||
containerImageName = "dantoml/busybox-windows"
|
||||
containerImageTag = "08012019"
|
||||
)
|
||||
Reference in New Issue
Block a user