Skip to content

Commit 2bc1ef6

Browse files
dgsudharsanmssonicbld
authored andcommitted
[DPB]Fix return code in case of failure (#3389)
* [DPB]Fix return code in case of failure * Updating UT
1 parent f478420 commit 2bc1ef6

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
@@ -4475,7 +4475,7 @@ def breakout(ctx, interface_name, mode, verbose, force_remove_dependencies, load
44754475
except Exception as e:
44764476
click.secho("Failed to break out Port. Error: {}".format(str(e)), fg='magenta')
44774477

4478-
sys.exit(0)
4478+
sys.exit(1)
44794479

44804480
def _get_all_mgmtinterface_keys():
44814481
"""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)