Skip to content

Commit

Permalink
Merge pull request kubernetes#6197 from yifan-gu/fix_verifyUnordered
Browse files Browse the repository at this point in the history
kubelet_test: Fix copy bug.
  • Loading branch information
vmarmol committed Mar 31, 2015
2 parents acd67eb + 7b1ea6b commit 9ed8761
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/kubelet/dockertools/fake_docker_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion pkg/kubelet/kubelet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 9ed8761

Please sign in to comment.