mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03: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:
@ -141,7 +141,7 @@ func TestExecAfterContainerRestart(t *testing.T) {
|
||||
t.Fatal(out, err)
|
||||
}
|
||||
|
||||
cleanedContainerID := stripTrailingCharacters(out)
|
||||
cleanedContainerID := strings.TrimSpace(out)
|
||||
|
||||
runCmd = exec.Command(dockerBinary, "restart", cleanedContainerID)
|
||||
if out, _, err = runCommandWithOutput(runCmd); err != nil {
|
||||
@ -253,7 +253,7 @@ func TestExecPausedContainer(t *testing.T) {
|
||||
t.Fatal(out, err)
|
||||
}
|
||||
|
||||
ContainerID := stripTrailingCharacters(out)
|
||||
ContainerID := strings.TrimSpace(out)
|
||||
|
||||
pausedCmd := exec.Command(dockerBinary, "pause", "testing")
|
||||
out, _, _, err = runCommandWithStdoutStderr(pausedCmd)
|
||||
@ -501,12 +501,12 @@ func TestLinksPingLinkedContainersOnRename(t *testing.T) {
|
||||
|
||||
var out string
|
||||
out, _, _ = dockerCmd(t, "run", "-d", "--name", "container1", "busybox", "sleep", "10")
|
||||
idA := stripTrailingCharacters(out)
|
||||
idA := strings.TrimSpace(out)
|
||||
if idA == "" {
|
||||
t.Fatal(out, "id should not be nil")
|
||||
}
|
||||
out, _, _ = dockerCmd(t, "run", "-d", "--link", "container1:alias1", "--name", "container2", "busybox", "sleep", "10")
|
||||
idB := stripTrailingCharacters(out)
|
||||
idB := strings.TrimSpace(out)
|
||||
if idB == "" {
|
||||
t.Fatal(out, "id should not be nil")
|
||||
}
|
||||
|
Reference in New Issue
Block a user