@@ -80,6 +80,12 @@ def test_mirror_session_add():
80
80
81
81
mocked .assert_called_with ("test_session" , "100.1.1.1" , "2.2.2.2" , 8 , 63 , 0x1234 , 100 , None )
82
82
83
+ result = runner .invoke (
84
+ config .config .commands ["mirror_session" ].commands ["add" ],
85
+ ["test_session" , "100.1.1.1" , "2.2.2.2" , "8" , "63" , "0" , "0" ])
86
+
87
+ mocked .assert_called_with ("test_session" , "100.1.1.1" , "2.2.2.2" , 8 , 63 , 0 , 0 , None )
88
+
83
89
84
90
def test_mirror_session_erspan_add ():
85
91
runner = CliRunner ()
@@ -153,6 +159,12 @@ def test_mirror_session_erspan_add():
153
159
154
160
mocked .assert_called_with ("test_session" , "100.1.1.1" , "2.2.2.2" , 8 , 63 , 0x1234 , 100 , None , None , None )
155
161
162
+ result = runner .invoke (
163
+ config .config .commands ["mirror_session" ].commands ["erspan" ].commands ["add" ],
164
+ ["test_session" , "100.1.1.1" , "2.2.2.2" , "8" , "63" , "0" , "0" ])
165
+
166
+ mocked .assert_called_with ("test_session" , "100.1.1.1" , "2.2.2.2" , 8 , 63 , 0 , 0 , None , None , None )
167
+
156
168
157
169
def test_mirror_session_span_add ():
158
170
runner = CliRunner ()
@@ -246,9 +258,12 @@ def test_mirror_session_span_add():
246
258
result = runner .invoke (
247
259
config .config .commands ["mirror_session" ].commands ["span" ].commands ["add" ],
248
260
["test_session" , "Ethernet8" , "Ethernet4" , "tx" , "100" ])
261
+
262
+ mocked .assert_called_with ("test_session" , "Ethernet8" , "Ethernet4" , "tx" , 100 , None )
263
+
249
264
result = runner .invoke (
250
265
config .config .commands ["mirror_session" ].commands ["span" ].commands ["add" ],
251
- ["test_session" , "Ethernet0" , "Ethernet4" , "rx" , "100 " ])
266
+ ["test_session" , "Ethernet0" , "Ethernet4" , "rx" , "0 " ])
252
267
253
- mocked .assert_called_with ("test_session" , "Ethernet0" , "Ethernet4" , "rx" , 100 , None )
268
+ mocked .assert_called_with ("test_session" , "Ethernet0" , "Ethernet4" , "rx" , 0 , None )
254
269
0 commit comments