mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix a bad assumption
If the empty variable happens to be sorted to the end of the list then TrimSpace() would remove it. Instead only strip the single trailing newline. Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
945d80cd6a
commit
fff605c3b3
1 changed files with 1 additions and 1 deletions
|
@ -824,7 +824,7 @@ func (s *DockerSuite) TestRunEnvironment(c *check.C) {
|
||||||
})
|
})
|
||||||
result.Assert(c, icmd.Success)
|
result.Assert(c, icmd.Success)
|
||||||
|
|
||||||
actualEnv := strings.Split(strings.TrimSpace(result.Combined()), "\n")
|
actualEnv := strings.Split(strings.TrimSuffix(result.Stdout(), "\n"), "\n")
|
||||||
sort.Strings(actualEnv)
|
sort.Strings(actualEnv)
|
||||||
|
|
||||||
goodEnv := []string{
|
goodEnv := []string{
|
||||||
|
|
Loading…
Add table
Reference in a new issue