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:
Sebastiaan van Stijn 2019-09-23 13:41:45 +02:00
parent 611c8fade6
commit 3e4f6225da
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
8 changed files with 8 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -16,6 +16,7 @@ type testingT interface {
assert.TestingT
logT
Fatalf(string, ...interface{})
Name() string
}
type logT interface {

View File

@ -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)

View File

@ -14,6 +14,7 @@ import (
type testingT interface {
Fatal(args ...interface{})
Fatalf(string, ...interface{})
Name() string
}
// New creates a fake build context

View File

@ -21,6 +21,7 @@ type testingT interface {
skipT
Fatal(args ...interface{})
Fatalf(string, ...interface{})
Name() string
}
type logT interface {

View File

@ -30,6 +30,7 @@ type testingT interface {
skipT
Fatal(args ...interface{})
Fatalf(string, ...interface{})
Name() string
}
type logT interface {

View File

@ -28,6 +28,7 @@ type testingT interface {
logT
Fatal(...interface{})
Fatalf(string, ...interface{})
Name() string
}
type logT interface {