Merge pull request #6197 from yifan-gu/fix_verifyUnordered

kubelet_test: Fix copy bug.
This commit is contained in:
Victor Marmol 2015-03-30 17:33:51 -07:00
commit 9ed87612d0
2 changed files with 4 additions and 2 deletions

View File

@ -71,7 +71,8 @@ func (f *FakeDockerClient) AssertUnorderedCalls(calls []string) (err error) {
f.Lock()
defer f.Unlock()
var actual, expected []string
actual := make([]string, len(calls))
expected := make([]string, len(f.called))
copy(actual, calls)
copy(expected, f.called)

View File

@ -144,7 +144,8 @@ func verifyStringArrayEquals(t *testing.T, actual, expected []string) {
}
func verifyStringArrayEqualsAnyOrder(t *testing.T, actual, expected []string) {
var act, exp []string
act := make([]string, len(actual))
exp := make([]string, len(expected))
copy(act, actual)
copy(exp, expected)