@@ -53,9 +53,12 @@ var tenantSlug = "test-tenant-slug"
53
53
54
54
var restorationHash = "6f6c67651f0b43b2969ba2ae35c74fc91815513b"
55
55
56
- var customFields = map [string ]string {"example_field" : "example value" }
57
- var customFieldsWithHash = map [string ]string {"example_field" : "example value" , "netboxOperatorRestorationHash" : restorationHash }
58
- var customFieldsWithHashMissmatch = map [string ]string {"example_field" : "example value" , "netboxOperatorRestorationHash" : "different hash" }
56
+ var customFieldsCR = map [string ]string {"example_field" : "example value" }
57
+ var customFieldsWithHashCR = map [string ]string {"example_field" : "example value" , "netboxOperatorRestorationHash" : restorationHash }
58
+
59
+ var customFields = map [string ]interface {}{"example_field" : "example value" }
60
+ var customFieldsWithHash = map [string ]interface {}{"example_field" : "example value" , "netboxOperatorRestorationHash" : restorationHash }
61
+ var customFieldsWithHashMissmatch = map [string ]interface {}{"example_field" : "example value" , "netboxOperatorRestorationHash" : "different hash" }
59
62
60
63
var netboxLabel = "Status"
61
64
var value = "active"
@@ -73,7 +76,7 @@ func defaultIpAddressCR(preserveInNetbox bool) *netboxv1.IpAddress {
73
76
Spec : netboxv1.IpAddressSpec {
74
77
IpAddress : ipAddress ,
75
78
Tenant : tenant ,
76
- CustomFields : customFields ,
79
+ CustomFields : customFieldsCR ,
77
80
Comments : comments ,
78
81
Description : description ,
79
82
PreserveInNetbox : preserveInNetbox ,
@@ -90,7 +93,7 @@ func defaultIpAddressCreatedByClaim(preserveInNetbox bool) *netboxv1.IpAddress {
90
93
Spec : netboxv1.IpAddressSpec {
91
94
IpAddress : ipAddress ,
92
95
Tenant : tenant ,
93
- CustomFields : customFieldsWithHash ,
96
+ CustomFields : customFieldsWithHashCR ,
94
97
Comments : comments ,
95
98
Description : description ,
96
99
PreserveInNetbox : preserveInNetbox ,
@@ -107,7 +110,7 @@ func defaultIpAddressClaimCR() *netboxv1.IpAddressClaim {
107
110
Spec : netboxv1.IpAddressClaimSpec {
108
111
ParentPrefix : parentPrefix ,
109
112
Tenant : tenant ,
110
- CustomFields : customFields ,
113
+ CustomFields : customFieldsCR ,
111
114
Comments : comments ,
112
115
Description : description ,
113
116
PreserveInNetbox : false ,
@@ -177,7 +180,7 @@ func mockedResponsePrefixList() *ipam.IpamPrefixesListOKBody {
177
180
}
178
181
}
179
182
180
- func mockedResponseIPAddressListWithHash (customFields map [string ]string ) * ipam.IpamIPAddressesListOKBody {
183
+ func mockedResponseIPAddressListWithHash (customFields map [string ]interface {} ) * ipam.IpamIPAddressesListOKBody {
181
184
return & ipam.IpamIPAddressesListOKBody {
182
185
Results : []* netboxModels.IPAddress {
183
186
{
0 commit comments