File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ def main():
338
338
print "The rates are calculated within %s seconds period" % wait_time_in_seconds
339
339
cnstat_new_dict = intfstat .get_cnstat (rif = interface_name )
340
340
if interface_name :
341
- intfstat .cnstat_single_interface (interface_name , cnstat_dict , cnstat_cached_dict )
341
+ intfstat .cnstat_single_interface (interface_name , cnstat_new_dict , cnstat_dict )
342
342
else :
343
343
intfstat .cnstat_diff_print (cnstat_new_dict , cnstat_dict , use_json )
344
344
Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ def test_period(self):
47
47
print (result .output )
48
48
assert result .output .split ('\n ' )[0 ] == "The rates are calculated within 3 seconds period"
49
49
50
+ def test_period_single_interface (self ):
51
+ runner = CliRunner ()
52
+ result = runner .invoke (show .cli .commands ["interfaces" ].commands ["counters" ].commands ["rif" ], ["Ethernet20" , "-p3" ])
53
+ print (result .output )
54
+ assert result .output .split ('\n ' )[0 ] == "The rates are calculated within 3 seconds period"
55
+
50
56
def test_single_intfs (self ):
51
57
runner = CliRunner ()
52
58
result = runner .invoke (show .cli .commands ["interfaces" ].commands ["counters" ].commands ["rif" ], ["Ethernet20" ])
You can’t perform that action at this time.
0 commit comments