Before:
daemon.go:26: Creating a new daemon at: "/go/src/github.com/docker/docker/bundles/test-integration/TestDockerSwarmSuite/TestSwarmNetworkCreateDup"
After:
docker_cli_swarm_test.go:1522: Creating a new daemon at: "/go/src/github.com/docker/docker/bundles/test-integration/TestDockerSwarmSuite/TestSwarmNetworkCreateDup"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -349,6 +349,7 @@ func (s *DockerSwarmSuite) SetUpTest(c *testing.T) {
|
| 349 | 349 |
} |
| 350 | 350 |
|
| 351 | 351 |
func (s *DockerSwarmSuite) AddDaemon(c *testing.T, joinSwarm, manager bool) *daemon.Daemon {
|
| 352 |
+ c.Helper() |
|
| 352 | 353 |
d := daemon.New(c, dockerBinary, dockerdBinary, |
| 353 | 354 |
testdaemon.WithEnvironment(testEnv.Execution), |
| 354 | 355 |
testdaemon.WithSwarmPort(defaultSwarmPort+s.portIndex), |
| ... | ... |
@@ -22,6 +22,7 @@ type Daemon struct {
|
| 22 | 22 |
// This will create a directory such as d123456789 in the folder specified by $DOCKER_INTEGRATION_DAEMON_DEST or $DEST. |
| 23 | 23 |
// The daemon will not automatically start. |
| 24 | 24 |
func New(t testing.TB, dockerBinary string, dockerdBinary string, ops ...daemon.Option) *Daemon {
|
| 25 |
+ t.Helper() |
|
| 25 | 26 |
ops = append(ops, daemon.WithDockerdBinary(dockerdBinary)) |
| 26 | 27 |
d := daemon.New(t, ops...) |
| 27 | 28 |
return &Daemon{
|
| ... | ... |
@@ -78,9 +79,10 @@ func (d *Daemon) inspectFieldWithError(name, field string) (string, error) {
|
| 78 | 78 |
|
| 79 | 79 |
// CheckActiveContainerCount returns the number of active containers |
| 80 | 80 |
// FIXME(vdemeester) should re-use ActivateContainers in some way |
| 81 |
-func (d *Daemon) CheckActiveContainerCount(c *testing.T) (interface{}, string) {
|
|
| 81 |
+func (d *Daemon) CheckActiveContainerCount(t *testing.T) (interface{}, string) {
|
|
| 82 |
+ t.Helper() |
|
| 82 | 83 |
out, err := d.Cmd("ps", "-q")
|
| 83 |
- assert.NilError(c, err) |
|
| 84 |
+ assert.NilError(t, err) |
|
| 84 | 85 |
if len(strings.TrimSpace(out)) == 0 {
|
| 85 | 86 |
return 0, "" |
| 86 | 87 |
} |