mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove stripTrailingCharacters from tests
This was just an alias to `strings.TrimSpace` Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
a73b7354a6
commit
475c65319b
31 changed files with 130 additions and 129 deletions
|
|
@ -15,7 +15,7 @@ func TestExportContainerAndImportImage(t *testing.T) {
|
|||
t.Fatal("failed to create a container", out, err)
|
||||
}
|
||||
|
||||
cleanedContainerID := stripTrailingCharacters(out)
|
||||
cleanedContainerID := strings.TrimSpace(out)
|
||||
|
||||
inspectCmd := exec.Command(dockerBinary, "inspect", cleanedContainerID)
|
||||
out, _, err = runCommandWithOutput(inspectCmd)
|
||||
|
|
@ -35,7 +35,7 @@ func TestExportContainerAndImportImage(t *testing.T) {
|
|||
t.Fatalf("failed to import image: %s, %v", out, err)
|
||||
}
|
||||
|
||||
cleanedImageID := stripTrailingCharacters(out)
|
||||
cleanedImageID := strings.TrimSpace(out)
|
||||
|
||||
inspectCmd = exec.Command(dockerBinary, "inspect", cleanedImageID)
|
||||
if out, _, err = runCommandWithOutput(inspectCmd); err != nil {
|
||||
|
|
@ -56,7 +56,7 @@ func TestExportContainerWithOutputAndImportImage(t *testing.T) {
|
|||
t.Fatal("failed to create a container", out, err)
|
||||
}
|
||||
|
||||
cleanedContainerID := stripTrailingCharacters(out)
|
||||
cleanedContainerID := strings.TrimSpace(out)
|
||||
|
||||
inspectCmd := exec.Command(dockerBinary, "inspect", cleanedContainerID)
|
||||
out, _, err = runCommandWithOutput(inspectCmd)
|
||||
|
|
@ -81,7 +81,7 @@ func TestExportContainerWithOutputAndImportImage(t *testing.T) {
|
|||
t.Fatalf("failed to import image: %s, %v", out, err)
|
||||
}
|
||||
|
||||
cleanedImageID := stripTrailingCharacters(out)
|
||||
cleanedImageID := strings.TrimSpace(out)
|
||||
|
||||
inspectCmd = exec.Command(dockerBinary, "inspect", cleanedImageID)
|
||||
if out, _, err = runCommandWithOutput(inspectCmd); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue