@@ -383,22 +383,6 @@ func TestPrefix_ReserveOrUpdate(t *testing.T) {
383
383
mockTenancy := mock_interfaces .NewMockTenancyInterface (ctrl )
384
384
mockDcim := mock_interfaces .NewMockDcimInterface (ctrl )
385
385
386
- //prefix mock input
387
- prefixToCreate := & netboxModels.WritablePrefix {
388
- Comments : comments + warningComment ,
389
- Description : description + warningComment ,
390
- CustomFields : make (map [string ]interface {}),
391
- Prefix : prefixPtr ,
392
- Site : & siteOutputId ,
393
- Tenant : & tenantOutputId ,
394
- Status : "active" ,
395
- }
396
-
397
- createPrefixInput := ipam .
398
- NewIpamPrefixesCreateParams ().
399
- WithDefaults ().
400
- WithData (prefixToCreate )
401
-
402
386
//prefix mock output
403
387
createPrefixOutput := & ipam.IpamPrefixesCreateCreated {
404
388
Payload : & netboxModels.Prefix {
@@ -419,7 +403,8 @@ func TestPrefix_ReserveOrUpdate(t *testing.T) {
419
403
mockTenancy .EXPECT ().TenancyTenantsList (tenantListRequestInput , nil ).Return (tenantListRequestOutput , nil ).AnyTimes ()
420
404
mockDcim .EXPECT ().DcimSitesList (siteListRequestInput , nil ).Return (siteListRequestOutput , nil ).AnyTimes ()
421
405
mockIpam .EXPECT ().IpamPrefixesList (prefixListRequestInput , nil ).Return (emptyPrefixListOutput , nil )
422
- mockIpam .EXPECT ().IpamPrefixesCreate (createPrefixInput , nil ).Return (createPrefixOutput , nil )
406
+ // use go mock Any as the input parameter contains pointers
407
+ mockIpam .EXPECT ().IpamPrefixesCreate (gomock .Any (), nil ).Return (createPrefixOutput , nil )
423
408
424
409
netboxClient := & NetboxClient {
425
410
Ipam : mockIpam ,
0 commit comments