mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Using test names instead of hardcoded ones in integration/container directory
Signed-off-by: Cristina Yenyxe Gonzalez Garcia <cristina.yenyxe@gmail.com>
This commit is contained in:
parent
6bc112abde
commit
4cabad6bae
2 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,7 @@ package container // import "github.com/docker/docker/integration/container"
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ func TestExportContainerAndImportImage(t *testing.T) {
|
||||||
cID := container.Run(ctx, t, client, container.WithCmd("true"))
|
cID := container.Run(ctx, t, client, container.WithCmd("true"))
|
||||||
poll.WaitOn(t, container.IsStopped(ctx, client, cID), poll.WithDelay(100*time.Millisecond))
|
poll.WaitOn(t, container.IsStopped(ctx, client, cID), poll.WithDelay(100*time.Millisecond))
|
||||||
|
|
||||||
reference := "repo/testexp:v1"
|
reference := "repo/" + strings.ToLower(t.Name()) + ":v1"
|
||||||
exportResp, err := client.ContainerExport(ctx, cID)
|
exportResp, err := client.ContainerExport(ctx, cID)
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
importResp, err := client.ImageImport(ctx, types.ImageImportSource{
|
importResp, err := client.ImageImport(ctx, types.ImageImportSource{
|
||||||
|
|
|
@ -3,6 +3,7 @@ package container // import "github.com/docker/docker/integration/container"
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ func TestInspectCpusetInConfigPre120(t *testing.T) {
|
||||||
client := request.NewAPIClient(t, client.WithVersion("1.19"))
|
client := request.NewAPIClient(t, client.WithVersion("1.19"))
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
name := "cpusetinconfig-pre120-" + t.Name()
|
name := strings.ToLower(t.Name())
|
||||||
// Create container with up to-date-API
|
// Create container with up to-date-API
|
||||||
container.Run(ctx, t, request.NewAPIClient(t), container.WithName(name),
|
container.Run(ctx, t, request.NewAPIClient(t), container.WithName(name),
|
||||||
container.WithCmd("true"),
|
container.WithCmd("true"),
|
||||||
|
|
Loading…
Reference in a new issue