Merge pull request #991 from crosbymichael/test-name

Use t.Name() for container ids in tests
This commit is contained in:
Kenfe-Mickaël Laventure 2017-06-12 09:40:58 -07:00 committed by GitHub
commit 64e83bab10
2 changed files with 9 additions and 9 deletions

View File

@ -20,7 +20,7 @@ func TestCheckpointRestore(t *testing.T) {
var ( var (
ctx, cancel = testContext() ctx, cancel = testContext()
id = "CheckpointRestore" id = t.Name()
) )
defer cancel() defer cancel()
@ -113,7 +113,7 @@ func TestCheckpointRestoreNewContainer(t *testing.T) {
} }
defer client.Close() defer client.Close()
const id = "CheckpointRestoreNewContainer" id := t.Name()
ctx, cancel := testContext() ctx, cancel := testContext()
defer cancel() defer cancel()

View File

@ -43,7 +43,7 @@ func TestNewContainer(t *testing.T) {
if testing.Short() { if testing.Short() {
t.Skip() t.Skip()
} }
id := "NewContainer" id := t.Name()
client, err := New(address) client, err := New(address)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
@ -90,7 +90,7 @@ func TestContainerStart(t *testing.T) {
var ( var (
ctx, cancel = testContext() ctx, cancel = testContext()
id = "ContainerStart" id = t.Name()
) )
defer cancel() defer cancel()
@ -160,7 +160,7 @@ func TestContainerOutput(t *testing.T) {
var ( var (
ctx, cancel = testContext() ctx, cancel = testContext()
id = "ContainerOutput" id = t.Name()
expected = "kingkoye" expected = "kingkoye"
) )
defer cancel() defer cancel()
@ -233,7 +233,7 @@ func TestContainerExec(t *testing.T) {
var ( var (
ctx, cancel = testContext() ctx, cancel = testContext()
id = "ContainerExec" id = t.Name()
) )
defer cancel() defer cancel()
@ -320,7 +320,7 @@ func TestContainerProcesses(t *testing.T) {
var ( var (
ctx, cancel = testContext() ctx, cancel = testContext()
id = "ContainerProcesses" id = t.Name()
) )
defer cancel() defer cancel()
@ -393,7 +393,7 @@ func TestContainerCloseStdin(t *testing.T) {
var ( var (
ctx, cancel = testContext() ctx, cancel = testContext()
id = "ContainerCloseStdin" id = t.Name()
) )
defer cancel() defer cancel()
@ -477,7 +477,7 @@ func TestContainerAttach(t *testing.T) {
var ( var (
ctx, cancel = testContext() ctx, cancel = testContext()
id = "ContainerAttach" id = t.Name()
) )
defer cancel() defer cancel()