Skip to content

Commit

Permalink
Merge branch 'tk_tof3_prof_nam_bf' of github.com:tkerykx/sonic-utilit…
Browse files Browse the repository at this point in the history
…ies into tk_tof3_prof_nam_bf
  • Loading branch information
Taras Keryk committed Nov 23, 2022
2 parents 00bdadb + 8fa6adc commit 32c5c89
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 320 deletions.
1 change: 1 addition & 0 deletions config/plugins/barefoot.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def profile(profile):

# Get chip family
hwsku_dir = device_info.get_path_to_hwsku_dir()
chip_family = ""
with open(hwsku_dir + '/switch-tna-sai.conf') as file:
chip_family = json.load(file)['chip_list'][0]['chip_family'].lower()

Expand Down
15 changes: 15 additions & 0 deletions tests/config_barefoot_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ def test_profile(self):
print("result.exit_code:", result.exit_code)
print("result.output:", result.output)
assert result.output == expected_output

runner = CliRunner()
expected_output = "Swss service will be restarted, continue? [y/N]: \nAborted!\n"
result = runner.invoke(bf.barefoot.commands['profile'], ['x1'])
print("result.exit_code:", result.exit_code)
print("result.output:", result.output)
assert result.output == expected_output

runner = CliRunner()
expected_output = "Swss service will be restarted, continue? [y/N]: \nAborted!\n"
result = runner.invoke(bf.barefoot.commands['profile'], ['y2'])
print("result.exit_code:", result.exit_code)
print("result.output:", result.output)
assert result.output == expected_output

#mock_run_command.assert_called_with('show platform barefoot profile', display_cmd=False)

def test_register(self):
Expand Down
320 changes: 0 additions & 320 deletions tests/conftest.py-orig

This file was deleted.

0 comments on commit 32c5c89

Please sign in to comment.