@@ -46,8 +46,8 @@ func TestIPRangeClaim(t *testing.T) {
46
46
ipRangeV4_7 := "10.112.140.7/24"
47
47
ipRangeV4_8 := "10.112.140.8/24"
48
48
49
- expectedIp_5 := "10.112.140.5/32"
50
- expectedIp_7 := "10.112.140.7/32"
49
+ expectedIpDot5 := "10.112.140.5/32"
50
+ expectedIpDot7 := "10.112.140.7/32"
51
51
52
52
// example of available IPv4 ip adress
53
53
availableIpAdressesIPv4 := func () []* netboxModels.AvailableIP {
@@ -144,8 +144,8 @@ func TestIPRangeClaim(t *testing.T) {
144
144
// assert error
145
145
AssertNil (t , err )
146
146
// assert nil output
147
- assert .Equal (t , expectedIp_5 , actual .StartAddress )
148
- assert .Equal (t , expectedIp_7 , actual .EndAddress )
147
+ assert .Equal (t , expectedIpDot5 , actual .StartAddress )
148
+ assert .Equal (t , expectedIpDot7 , actual .EndAddress )
149
149
})
150
150
151
151
t .Run ("Fail first available IP range by claim (IPv6) if not enough consequiteve ips." , func (t * testing.T ) {
@@ -225,8 +225,8 @@ func TestIPRangeClaim(t *testing.T) {
225
225
Previous : nil ,
226
226
Results : []* netboxModels.IPRange {
227
227
{
228
- StartAddress : & expectedIp_5 ,
229
- EndAddress : & expectedIp_7 ,
228
+ StartAddress : & expectedIpDot5 ,
229
+ EndAddress : & expectedIpDot7 ,
230
230
},
231
231
},
232
232
},
@@ -246,8 +246,8 @@ func TestIPRangeClaim(t *testing.T) {
246
246
actual , err := client .RestoreExistingIpRangeByHash (input )
247
247
248
248
assert .Nil (t , err )
249
- assert .Equal (t , expectedIp_5 , actual .StartAddress )
250
- assert .Equal (t , expectedIp_7 , actual .EndAddress )
249
+ assert .Equal (t , expectedIpDot5 , actual .StartAddress )
250
+ assert .Equal (t , expectedIpDot7 , actual .EndAddress )
251
251
})
252
252
253
253
t .Run ("Fail reclaim IP Range if multiple results returned" , func (t * testing.T ) {
@@ -260,12 +260,12 @@ func TestIPRangeClaim(t *testing.T) {
260
260
Previous : nil ,
261
261
Results : []* netboxModels.IPRange {
262
262
{
263
- StartAddress : & expectedIp_5 ,
264
- EndAddress : & expectedIp_7 ,
263
+ StartAddress : & expectedIpDot5 ,
264
+ EndAddress : & expectedIpDot7 ,
265
265
},
266
266
{
267
- StartAddress : & expectedIp_5 ,
268
- EndAddress : & expectedIp_7 ,
267
+ StartAddress : & expectedIpDot5 ,
268
+ EndAddress : & expectedIpDot7 ,
269
269
},
270
270
},
271
271
},
0 commit comments