testutil: remove unneeded namer, testname interfaces
Now that the gocheck framework is no longer used, we don't have to define these interfaces. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
611c8fade6
commit
3e4f6225da
8 changed files with 8 additions and 12 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
type testingT interface {
|
||||
Fatal(args ...interface{})
|
||||
Fatalf(string, ...interface{})
|
||||
Name() string
|
||||
}
|
||||
|
||||
// WithStdinContext sets the build context from the standard input with the specified reader
|
||||
|
|
|
@ -28,6 +28,7 @@ type testingT interface {
|
|||
assert.TestingT
|
||||
Fatal(args ...interface{})
|
||||
Fatalf(string, ...interface{})
|
||||
Name() string
|
||||
}
|
||||
|
||||
// DockerCmd executes the specified docker command and expect a success
|
||||
|
|
|
@ -16,6 +16,7 @@ type testingT interface {
|
|||
assert.TestingT
|
||||
logT
|
||||
Fatalf(string, ...interface{})
|
||||
Name() string
|
||||
}
|
||||
|
||||
type logT interface {
|
||||
|
|
|
@ -32,14 +32,8 @@ type testingT interface {
|
|||
assert.TestingT
|
||||
logT
|
||||
Fatalf(string, ...interface{})
|
||||
}
|
||||
|
||||
type namer interface {
|
||||
Name() string
|
||||
}
|
||||
type testNamer interface {
|
||||
TestName() string
|
||||
}
|
||||
|
||||
type logT interface {
|
||||
Logf(string, ...interface{})
|
||||
|
@ -157,13 +151,8 @@ func New(t testingT, ops ...Option) *Daemon {
|
|||
if dest == "" {
|
||||
dest = os.Getenv("DEST")
|
||||
}
|
||||
dest = filepath.Join(dest, t.Name())
|
||||
|
||||
switch v := t.(type) {
|
||||
case namer:
|
||||
dest = filepath.Join(dest, v.Name())
|
||||
case testNamer:
|
||||
dest = filepath.Join(dest, v.TestName())
|
||||
}
|
||||
assert.Check(t, dest != "", "Please set the DOCKER_INTEGRATION_DAEMON_DEST or the DEST environment variable")
|
||||
|
||||
t.Logf("Creating a new daemon at: %q", dest)
|
||||
|
|
|
@ -14,6 +14,7 @@ import (
|
|||
type testingT interface {
|
||||
Fatal(args ...interface{})
|
||||
Fatalf(string, ...interface{})
|
||||
Name() string
|
||||
}
|
||||
|
||||
// New creates a fake build context
|
||||
|
|
|
@ -21,6 +21,7 @@ type testingT interface {
|
|||
skipT
|
||||
Fatal(args ...interface{})
|
||||
Fatalf(string, ...interface{})
|
||||
Name() string
|
||||
}
|
||||
|
||||
type logT interface {
|
||||
|
|
|
@ -30,6 +30,7 @@ type testingT interface {
|
|||
skipT
|
||||
Fatal(args ...interface{})
|
||||
Fatalf(string, ...interface{})
|
||||
Name() string
|
||||
}
|
||||
|
||||
type logT interface {
|
||||
|
|
|
@ -28,6 +28,7 @@ type testingT interface {
|
|||
logT
|
||||
Fatal(...interface{})
|
||||
Fatalf(string, ...interface{})
|
||||
Name() string
|
||||
}
|
||||
|
||||
type logT interface {
|
||||
|
|
Loading…
Add table
Reference in a new issue