Merge pull request #45635 from MrHohn/hyperkube-unit-test

Automatic merge from submit-queue (batch tested with PRs 45514, 45635)

hyperkube_test should not depend on number of spaces.

From #45524.

Apparently adding a long flag to kube-controller-manager breaks the hyperkube unit tests, because they depend on number of spaces :)

**Release note**:

```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-05-23 20:52:56 -07:00 committed by GitHub
commit 1153ef19ce
1 changed files with 4 additions and 2 deletions

View File

@ -175,7 +175,8 @@ func TestServerHelp(t *testing.T) {
x := runFull(t, "hyperkube test1 --help")
assert.NoError(t, x.err)
assert.Contains(t, x.output, "A simple server named test1")
assert.Contains(t, x.output, "-h, --help help for hyperkube")
assert.Contains(t, x.output, "-h, --help")
assert.Contains(t, x.output, "help for hyperkube")
assert.NotContains(t, x.output, "test1 Run")
}
@ -183,7 +184,8 @@ func TestServerFlagsBad(t *testing.T) {
x := runFull(t, "hyperkube test1 --bad-flag")
assert.EqualError(t, x.err, "unknown flag: --bad-flag")
assert.Contains(t, x.output, "A simple server named test1")
assert.Contains(t, x.output, "-h, --help help for hyperkube")
assert.Contains(t, x.output, "-h, --help")
assert.Contains(t, x.output, "help for hyperkube")
assert.NotContains(t, x.output, "test1 Run")
}