Skip to content

Commit dc70f6d

Browse files
committed
fix: replace wantErr
1 parent cdde3b3 commit dc70f6d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exp/api/v1beta2/awsmachinepool_webhook_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func TestAWSMachinePoolValidateCreate(t *testing.T) {
264264
},
265265
},
266266
},
267-
wantErr: true,
267+
wantErrToContain: ptr.To[string]("Valid values are"),
268268
},
269269
{
270270
name: "with MarketType empty value provided",
@@ -275,7 +275,7 @@ func TestAWSMachinePoolValidateCreate(t *testing.T) {
275275
},
276276
},
277277
},
278-
wantErr: false,
278+
wantErrToContain: nil,
279279
},
280280
{
281281
name: "with MarketType Spot and CapacityReservationID value provided",
@@ -287,7 +287,7 @@ func TestAWSMachinePoolValidateCreate(t *testing.T) {
287287
},
288288
},
289289
},
290-
wantErr: true,
290+
wantErrToContain: ptr.To[string]("cannot be set to 'Spot' when CapacityReservationID is specified"),
291291
},
292292
{
293293
name: "with CapacityReservationID and SpotMarketOptions value provided",
@@ -299,7 +299,7 @@ func TestAWSMachinePoolValidateCreate(t *testing.T) {
299299
},
300300
},
301301
},
302-
wantErr: true,
302+
wantErrToContain: ptr.To[string]("cannot be set to when CapacityReservationID is specified"),
303303
},
304304

305305
{

0 commit comments

Comments
 (0)