Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:3357] [DPB]Fixing return code of breakout command on failure (#3357) #3363

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def breakout_Ports(cm, delPorts=list(), portJson=dict(), force=False, \
click.echo("*** Printing dependencies ***")
for dep in deps:
click.echo(dep)
sys.exit(0)
sys.exit(1)
else:
click.echo("[ERROR] Port breakout Failed!!! Opting Out")
raise click.Abort()
Expand Down
4 changes: 2 additions & 2 deletions tests/config_dpb_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def test_config_breakout_verbose(self, 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 'Dependencies Exist.' in result.output

# verbose must be set while creating instance of ConfigMgmt class
Expand Down Expand Up @@ -538,7 +538,7 @@ def config_dpb_port8_2x50G_1x100G():
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 'Dependencies Exist.' in result.output
assert 'Printing dependencies' in result.output
assert 'NO-NSW-PACL-V4' in result.output
Expand Down
Loading