File tree 3 files changed +16
-320
lines changed
3 files changed +16
-320
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ def profile(profile):
28
28
29
29
# Get chip family
30
30
hwsku_dir = device_info .get_path_to_hwsku_dir ()
31
+ chip_family = ""
31
32
with open (hwsku_dir + '/switch-tna-sai.conf' ) as file :
32
33
chip_family = json .load (file )['chip_list' ][0 ]['chip_family' ].lower ()
33
34
Original file line number Diff line number Diff line change @@ -33,6 +33,21 @@ def test_profile(self):
33
33
print ("result.exit_code:" , result .exit_code )
34
34
print ("result.output:" , result .output )
35
35
assert result .output == expected_output
36
+
37
+ runner = CliRunner ()
38
+ expected_output = "Swss service will be restarted, continue? [y/N]: \n Aborted!\n "
39
+ result = runner .invoke (bf .barefoot .commands ['profile' ], ['x1' ])
40
+ print ("result.exit_code:" , result .exit_code )
41
+ print ("result.output:" , result .output )
42
+ assert result .output == expected_output
43
+
44
+ runner = CliRunner ()
45
+ expected_output = "Swss service will be restarted, continue? [y/N]: \n Aborted!\n "
46
+ result = runner .invoke (bf .barefoot .commands ['profile' ], ['y2' ])
47
+ print ("result.exit_code:" , result .exit_code )
48
+ print ("result.output:" , result .output )
49
+ assert result .output == expected_output
50
+
36
51
#mock_run_command.assert_called_with('show platform barefoot profile', display_cmd=False)
37
52
38
53
def test_register (self ):
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments