mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-27 21:26:03 +00:00
This patch consists of various corrections. (#73060)
* This patch consists of various corrections. *) Remove unwanted `else` code block *) Adjust variable intialization. *) Correct error strings. *) Use recommended variable increment method. Signed-off-by: hchiramm <hchiramm@redhat.com> * Remove cluster/images/cluster-version-monitor from hack/.golint_failures. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
e1e85f947e
commit
2651c72166
@@ -108,9 +108,9 @@ func TestPodTemplateSpecHash(t *testing.T) {
|
||||
seenHashes := make(map[string]int)
|
||||
|
||||
for i := 0; i < 1000; i++ {
|
||||
specJson := strings.Replace(podSpec, "@@VERSION@@", strconv.Itoa(i), 1)
|
||||
specJSON := strings.Replace(podSpec, "@@VERSION@@", strconv.Itoa(i), 1)
|
||||
spec := v1.PodTemplateSpec{}
|
||||
json.Unmarshal([]byte(specJson), &spec)
|
||||
json.Unmarshal([]byte(specJSON), &spec)
|
||||
hash := controller.ComputeHash(&spec, nil)
|
||||
if v, ok := seenHashes[hash]; ok {
|
||||
t.Errorf("Hash collision, old: %d new: %d", v, i)
|
||||
|
Reference in New Issue
Block a user