Skip to content

Commit a277c8e

Browse files
rossigeeContinue
andcommitted
fix: update TCP defaulting webhook test expectations
Update the test to expect 7 patches instead of 6 due to DataStoreUsername defaulting being added. Also set DataStoreUsername in the 'fields already set' test to prevent unwanted patches. Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
1 parent 0e1929a commit a277c8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/webhook/handlers/tcp_defaults_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var _ = Describe("TCP Defaulting Webhook", func() {
4242
It("should issue all required patches", func() {
4343
ops, err := t.OnCreate(tcp)(ctx, admission.Request{})
4444
Expect(err).ToNot(HaveOccurred())
45-
Expect(ops).To(HaveLen(6))
45+
Expect(ops).To(HaveLen(7))
4646
})
4747

4848
It("should default the dataStore", func() {
@@ -66,6 +66,7 @@ var _ = Describe("TCP Defaulting Webhook", func() {
6666
BeforeEach(func() {
6767
tcp.Spec.DataStore = "etcd"
6868
tcp.Spec.DataStoreSchema = "my_tcp"
69+
tcp.Spec.DataStoreUsername = "my_tcp"
6970
tcp.Spec.ControlPlane.Deployment.Replicas = ptr.To(int32(2))
7071
tcp.Spec.NetworkProfile.ServiceCIDR = "10.96.0.0/16"
7172
tcp.Spec.NetworkProfile.PodCIDR = "10.244.0.0/16"

0 commit comments

Comments
 (0)