Skip to content

Commit 414cf3b

Browse files
authored
[DPB]Fix return code in case of failure (#3389)
* [DPB]Fix return code in case of failure * Updating UT
1 parent 06965df commit 414cf3b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

config/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4697,7 +4697,7 @@ def breakout(ctx, interface_name, mode, verbose, force_remove_dependencies, load
46974697
except Exception as e:
46984698
click.secho("Failed to break out Port. Error: {}".format(str(e)), fg='magenta')
46994699

4700-
sys.exit(0)
4700+
sys.exit(1)
47014701

47024702
def _get_all_mgmtinterface_keys():
47034703
"""Returns list of strings containing mgmt interface keys

tests/config_dpb_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def test_config_breakout_extra_table_warning(self, breakout_cfg_file, sonic_db):
350350
commands["breakout"], ['{}'.format(interface), '{}'.format(newMode), '-v', '-y'], obj=obj)
351351

352352
print(result.exit_code, result.output)
353-
assert result.exit_code == 0
353+
assert result.exit_code == 1
354354
assert 'Below Config can not be verified' in result.output
355355
assert 'UNKNOWN_TABLE' in result.output
356356
assert 'Do you wish to Continue?' in result.output

0 commit comments

Comments
 (0)