Skip to content

Commit bc58f55

Browse files
committed
Update unit tests to match new test data.
1 parent 769cba7 commit bc58f55

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

tests/integration/targets/latest/tasks/netbox_device_interface.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
- test_five['interface']['enabled'] == false
124124
- test_five['interface']['type'] == "1000base-t"
125125
- test_five['interface']['mgmt_only'] == false
126-
- test_five['interface']['lag'] == 15
126+
- test_five['interface']['lag'] == 18
127127
- test_five['interface']['mode'] == "access"
128128
- test_five['interface']['mtu'] == 1600
129129

@@ -221,7 +221,7 @@
221221
- test_eight['interface']['enabled'] == false
222222
- test_eight['interface']['type'] == "1000base-t"
223223
- test_eight['interface']['mgmt_only'] == false
224-
- test_eight['interface']['lag'] == 15
224+
- test_eight['interface']['lag'] == 18
225225
- test_eight['interface']['mode'] == "access"
226226
- test_eight['interface']['mtu'] == 1600
227227

@@ -231,7 +231,7 @@
231231
netbox_token: "0123456789abcdef0123456789abcdef01234567"
232232
data:
233233
device: Test Nexus Child One
234-
name: Ethernet2/1
234+
name: Ethernet2/2
235235
form_factor: 1000Base-T (1GE)
236236
state: present
237237
register: test_nine
@@ -240,10 +240,10 @@
240240
assert:
241241
that:
242242
- test_nine is changed
243-
- test_nine['msg'] == "interface Ethernet2/1 created"
243+
- test_nine['msg'] == "interface Ethernet2/2 created"
244244
- test_nine['diff']['before']['state'] == 'absent'
245245
- test_nine['diff']['after']['state'] == 'present'
246-
- test_nine['interface']['name'] == "Ethernet2/1"
246+
- test_nine['interface']['name'] == "Ethernet2/2"
247247
- test_nine['interface']['device'] == 5
248248
- test_nine['interface']['enabled'] == true
249249
- test_nine['interface']['type'] == "1000base-t"
@@ -254,7 +254,7 @@
254254
netbox_token: "0123456789abcdef0123456789abcdef01234567"
255255
data:
256256
device: Test Nexus One
257-
name: Ethernet2/1
257+
name: Ethernet2/2
258258
description: "Updated child interface from parent device"
259259
update_vc_child: True
260260
state: present
@@ -264,9 +264,9 @@
264264
assert:
265265
that:
266266
- test_ten is changed
267-
- test_ten['msg'] == "interface Ethernet2/1 updated"
267+
- test_ten['msg'] == "interface Ethernet2/2 updated"
268268
- test_ten['diff']['after']['description'] == 'Updated child interface from parent device'
269-
- test_ten['interface']['name'] == "Ethernet2/1"
269+
- test_ten['interface']['name'] == "Ethernet2/2"
270270
- test_ten['interface']['device'] == 5
271271
- test_ten['interface']['enabled'] == true
272272
- test_ten['interface']['type'] == "1000base-t"
@@ -278,7 +278,7 @@
278278
netbox_token: "0123456789abcdef0123456789abcdef01234567"
279279
data:
280280
device: Test Nexus One
281-
name: Ethernet2/1
281+
name: Ethernet2/2
282282
description: "Updated child interface from parent device - test"
283283
state: present
284284
ignore_errors: yes

tests/integration/targets/latest/tasks/netbox_ip_address.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@
174174
- test_eight['msg'] == "ip_address 10.10.1.30/16 created"
175175
- test_eight['ip_address']['address'] == "10.10.1.30/16"
176176
- test_eight['ip_address']['family'] == 4
177-
- test_eight['ip_address']['interface'] == 2
178-
- test_eight['ip_address']['nat_inside'] == 7
177+
- test_eight['ip_address']['interface'] == 3
178+
- test_eight['ip_address']['nat_inside'] == 10
179179
- test_eight['ip_address']['vrf'] == 1
180180

181181
- name: "9 - Create IP address on GigabitEthernet2 - test100 - State: present"
@@ -199,7 +199,7 @@
199199
- test_nine['msg'] == "ip_address 10.10.200.30/16 created"
200200
- test_nine['ip_address']['address'] == "10.10.200.30/16"
201201
- test_nine['ip_address']['family'] == 4
202-
- test_nine['ip_address']['interface'] == 3
202+
- test_nine['ip_address']['interface'] == 4
203203

204204
- name: "10 - Create IP address on GigabitEthernet2 - test100 - State: new"
205205
netbox.netbox.netbox_ip_address:
@@ -223,7 +223,7 @@
223223
- test_ten['msg'] == "ip_address 10.10.0.1/16 created"
224224
- test_ten['ip_address']['address'] == "10.10.0.1/16"
225225
- test_ten['ip_address']['family']['value'] == 4
226-
- test_ten['ip_address']['interface']['id'] == 3
226+
- test_ten['ip_address']['interface']['id'] == 4
227227

228228
- name: "11 - Create IP address on GigabitEthernet2 - test100 - State: present"
229229
netbox.netbox.netbox_ip_address:
@@ -265,7 +265,7 @@
265265
- not test_twelve['changed']
266266
- test_twelve['msg'] == "ip_address 192.168.100.2/24 already exists"
267267
- test_twelve['ip_address']['address'] == "192.168.100.2/24"
268-
- test_twelve['ip_address']['interface'] == 3
268+
- test_twelve['ip_address']['interface'] == 4
269269

270270
- name: "13 - Duplicate - 192.168.100.2/24"
271271
netbox.netbox.netbox_ip_address:
@@ -304,7 +304,7 @@
304304
- test_fourteen['msg'] == "ip_address 10.188.1.100/24 created"
305305
- test_fourteen['ip_address']['address'] == "10.188.1.100/24"
306306
- test_fourteen['ip_address']['family'] == 4
307-
- test_fourteen['ip_address']['interface'] == 4
307+
- test_fourteen['ip_address']['interface'] == 5
308308

309309
- name: "15 - Create IP address with no mask - State: Present"
310310
netbox.netbox.netbox_ip_address:

tests/integration/targets/v2.6/tasks/netbox_device_interface.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
- test_five['interface']['enabled'] == false
123123
- test_five['interface']['form_factor'] == 1000
124124
- test_five['interface']['mgmt_only'] == false
125-
- test_five['interface']['lag'] == 15
125+
- test_five['interface']['lag'] == 18
126126
- test_five['interface']['mode'] == 100
127127
- test_five['interface']['mtu'] == 1600
128128

@@ -220,7 +220,7 @@
220220
- test_eight['interface']['enabled'] == false
221221
- test_eight['interface']['form_factor'] == 1000
222222
- test_eight['interface']['mgmt_only'] == false
223-
- test_eight['interface']['lag'] == 15
223+
- test_eight['interface']['lag'] == 18
224224
- test_eight['interface']['mode'] == 100
225225
- test_eight['interface']['mtu'] == 1600
226226

@@ -230,7 +230,7 @@
230230
netbox_token: "0123456789abcdef0123456789abcdef01234567"
231231
data:
232232
device: Test Nexus Child One
233-
name: Ethernet2/1
233+
name: Ethernet2/2
234234
form_factor: 1000Base-T (1GE)
235235
state: present
236236
register: test_nine
@@ -239,10 +239,10 @@
239239
assert:
240240
that:
241241
- test_nine is changed
242-
- test_nine['msg'] == "interface Ethernet2/1 created"
242+
- test_nine['msg'] == "interface Ethernet2/2 created"
243243
- test_nine['diff']['before']['state'] == 'absent'
244244
- test_nine['diff']['after']['state'] == 'present'
245-
- test_nine['interface']['name'] == "Ethernet2/1"
245+
- test_nine['interface']['name'] == "Ethernet2/2"
246246
- test_nine['interface']['device'] == 5
247247
- test_nine['interface']['enabled'] == true
248248
- test_nine['interface']['form_factor'] == 1000
@@ -253,7 +253,7 @@
253253
netbox_token: "0123456789abcdef0123456789abcdef01234567"
254254
data:
255255
device: Test Nexus One
256-
name: Ethernet2/1
256+
name: Ethernet2/2
257257
description: "Updated child interface from parent device"
258258
update_vc_child: True
259259
state: present
@@ -263,9 +263,9 @@
263263
assert:
264264
that:
265265
- test_ten is changed
266-
- test_ten['msg'] == "interface Ethernet2/1 updated"
266+
- test_ten['msg'] == "interface Ethernet2/2 updated"
267267
- test_ten['diff']['after']['description'] == 'Updated child interface from parent device'
268-
- test_ten['interface']['name'] == "Ethernet2/1"
268+
- test_ten['interface']['name'] == "Ethernet2/2"
269269
- test_ten['interface']['device'] == 5
270270
- test_ten['interface']['enabled'] == true
271271
- test_ten['interface']['form_factor'] == 1000
@@ -277,7 +277,7 @@
277277
netbox_token: "0123456789abcdef0123456789abcdef01234567"
278278
data:
279279
device: Test Nexus One
280-
name: Ethernet2/1
280+
name: Ethernet2/2
281281
description: "Updated child interface from parent device - test"
282282
state: present
283283
ignore_errors: yes

tests/integration/targets/v2.6/tasks/netbox_ip_address.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@
174174
- test_eight['msg'] == "ip_address 10.10.1.30/16 created"
175175
- test_eight['ip_address']['address'] == "10.10.1.30/16"
176176
- test_eight['ip_address']['family'] == 4
177-
- test_eight['ip_address']['interface'] == 2
178-
- test_eight['ip_address']['nat_inside'] == 7
177+
- test_eight['ip_address']['interface'] == 3
178+
- test_eight['ip_address']['nat_inside'] == 10
179179
- test_eight['ip_address']['vrf'] == 1
180180

181181
- name: "9 - Create IP address on GigabitEthernet2 - test100 - State: present"
@@ -199,7 +199,7 @@
199199
- test_nine['msg'] == "ip_address 10.10.200.30/16 created"
200200
- test_nine['ip_address']['address'] == "10.10.200.30/16"
201201
- test_nine['ip_address']['family'] == 4
202-
- test_nine['ip_address']['interface'] == 3
202+
- test_nine['ip_address']['interface'] == 4
203203

204204
- name: "10 - Create IP address on GigabitEthernet2 - test100 - State: new"
205205
netbox.netbox.netbox_ip_address:
@@ -223,7 +223,7 @@
223223
- test_ten['msg'] == "ip_address 10.10.0.1/16 created"
224224
- test_ten['ip_address']['address'] == "10.10.0.1/16"
225225
- test_ten['ip_address']['family']['value'] == 4
226-
- test_ten['ip_address']['interface']['id'] == 3
226+
- test_ten['ip_address']['interface']['id'] == 4
227227

228228
- name: "11 - Create IP address on GigabitEthernet2 - test100 - State: present"
229229
netbox.netbox.netbox_ip_address:
@@ -265,7 +265,7 @@
265265
- not test_twelve['changed']
266266
- test_twelve['msg'] == "ip_address 192.168.100.2/24 already exists"
267267
- test_twelve['ip_address']['address'] == "192.168.100.2/24"
268-
- test_twelve['ip_address']['interface'] == 3
268+
- test_twelve['ip_address']['interface'] == 4
269269

270270
- name: "13 - Duplicate - 192.168.100.2/24"
271271
netbox.netbox.netbox_ip_address:
@@ -304,7 +304,7 @@
304304
- test_fourteen['msg'] == "ip_address 10.188.1.100/24 created"
305305
- test_fourteen['ip_address']['address'] == "10.188.1.100/24"
306306
- test_fourteen['ip_address']['family'] == 4
307-
- test_fourteen['ip_address']['interface'] == 4
307+
- test_fourteen['ip_address']['interface'] == 5
308308

309309
- name: "15 - Create IP address with no mask - State: Present"
310310
netbox.netbox.netbox_ip_address:

0 commit comments

Comments
 (0)