fix: update test hash values in TestGenerateID

The hash values in TestGenerateID were outdated after adding KubedogQPS
and KubedogBurst fields to ReleaseSpec. These fields are now included in
the hash calculation for release IDs, causing all expected hash values
to change.

Updated all test cases with the new correct hash values:
- baseline: foo-values-6d799cf798
- different bytes content: foo-values-7f885447bf
- different map content: foo-values-86f5d8fb55
- different chart: foo-values-5cd5c65db5
- different name: bar-values-c59b4f979
- specific ns: myns-foo-values-56d6cd88cc

This fixes the CI test failures.

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2026-03-03 08:51:49 +08:00
parent 6c98bfa7f0
commit ec8681eb6d
1 changed files with 6 additions and 6 deletions

View File

@ -38,39 +38,39 @@ func TestGenerateID(t *testing.T) {
run(testcase{
subject: "baseline",
release: ReleaseSpec{Name: "foo", Chart: "incubator/raw"},
want: "foo-values-dd88b94b8",
want: "foo-values-6d799cf798",
})
run(testcase{
subject: "different bytes content",
release: ReleaseSpec{Name: "foo", Chart: "incubator/raw"},
data: []byte(`{"k":"v"}`),
want: "foo-values-6fb7bbb95f",
want: "foo-values-7f885447bf",
})
run(testcase{
subject: "different map content",
release: ReleaseSpec{Name: "foo", Chart: "incubator/raw"},
data: map[string]any{"k": "v"},
want: "foo-values-56d84c9897",
want: "foo-values-86f5d8fb55",
})
run(testcase{
subject: "different chart",
release: ReleaseSpec{Name: "foo", Chart: "stable/envoy"},
want: "foo-values-6644fc9d47",
want: "foo-values-5cd5c65db5",
})
run(testcase{
subject: "different name",
release: ReleaseSpec{Name: "bar", Chart: "incubator/raw"},
want: "bar-values-859cd849bf",
want: "bar-values-c59b4f979",
})
run(testcase{
subject: "specific ns",
release: ReleaseSpec{Name: "foo", Chart: "incubator/raw", Namespace: "myns"},
want: "myns-foo-values-86d544f7f9",
want: "myns-foo-values-56d6cd88cc",
})
for id, n := range ids {