Skip to content

Commit

Permalink
[DPB]Fix return code in case of failure (#3389)
Browse files Browse the repository at this point in the history
* [DPB]Fix return code in case of failure

* Updating UT
  • Loading branch information
dgsudharsan authored Jul 1, 2024
1 parent 06965df commit 414cf3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4697,7 +4697,7 @@ def breakout(ctx, interface_name, mode, verbose, force_remove_dependencies, load
except Exception as e:
click.secho("Failed to break out Port. Error: {}".format(str(e)), fg='magenta')

sys.exit(0)
sys.exit(1)

def _get_all_mgmtinterface_keys():
"""Returns list of strings containing mgmt interface keys
Expand Down
2 changes: 1 addition & 1 deletion tests/config_dpb_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def test_config_breakout_extra_table_warning(self, breakout_cfg_file, sonic_db):
commands["breakout"], ['{}'.format(interface), '{}'.format(newMode), '-v', '-y'], obj=obj)

print(result.exit_code, result.output)
assert result.exit_code == 0
assert result.exit_code == 1
assert 'Below Config can not be verified' in result.output
assert 'UNKNOWN_TABLE' in result.output
assert 'Do you wish to Continue?' in result.output
Expand Down

0 comments on commit 414cf3b

Please sign in to comment.