Skip to content
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
4 changes: 2 additions & 2 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1907,8 +1907,8 @@ def override_config_table(db, input_config_db, dry_run):
if ns in config_input.keys():
ns_config_input = config_input[ns]
else:
click.secho("Wrong config format! {} not found in asic config! cannot override.. abort".format(ns))
sys.exit(1)
click.echo("Override config not present for {}".format(ns))
continue
if not ns_config_input:
# if ns_config_input is not defined, define it
# it could be single-asic dut, or config_input is empty
Expand Down
3 changes: 3 additions & 0 deletions tests/config_override_input/multi_asic_missing_asic.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"localhost": {
"DEVICE_METADATA": {}
},
"asic0": {
"DEVICE_METADATA": {}
}
}
6 changes: 3 additions & 3 deletions tests/config_override_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ def read_json_file_side_effect(filename):
runner = CliRunner()
result = runner.invoke(config.config.commands["override-config-table"],
['golden_config_db.json'], obj=db)
assert "not found in asic config" in result.output
# make sure program aborted with return code 1
assert result.exit_code == 1
assert "Override config not present for asic1" in result.output
# make sure program did not abort
assert result.exit_code == 0

@classmethod
def teardown_class(cls):
Expand Down