|
@@ -32,14 +32,8 @@ type testingT interface {
|
|
assert.TestingT
|
|
assert.TestingT
|
|
logT
|
|
logT
|
|
Fatalf(string, ...interface{})
|
|
Fatalf(string, ...interface{})
|
|
-}
|
|
|
|
-
|
|
|
|
-type namer interface {
|
|
|
|
Name() string
|
|
Name() string
|
|
}
|
|
}
|
|
-type testNamer interface {
|
|
|
|
- TestName() string
|
|
|
|
-}
|
|
|
|
|
|
|
|
type logT interface {
|
|
type logT interface {
|
|
Logf(string, ...interface{})
|
|
Logf(string, ...interface{})
|
|
@@ -157,13 +151,8 @@ func New(t testingT, ops ...Option) *Daemon {
|
|
if dest == "" {
|
|
if dest == "" {
|
|
dest = os.Getenv("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")
|
|
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)
|
|
t.Logf("Creating a new daemon at: %q", dest)
|