Skip to content

Commit

Permalink
[override] Remove table test which has no YANG model (#16507)
Browse files Browse the repository at this point in the history
Description of PR
Summary:Remove test for no yang supported table test


Approach
What is the motivation for this PR?
We plan on strict yang enforcement on config CLI. Thus it will fail for non-yang supported NEW_FEATURE_TABLE

How did you do it?
Remove test for tables without yang model

How did you verify/test it?
E2E test
  • Loading branch information
wen587 authored Jan 17, 2025
1 parent 5054d0a commit cbd2bfe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 61 deletions.
22 changes: 0 additions & 22 deletions tests/override_config_table/test_override_config_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,6 @@ def load_minigraph_with_golden_partial_config(duthost):
)


def load_minigraph_with_golden_new_feature(duthost):
"""Test Golden Config with new feature
"""
new_feature_config = {
"NEW_FEATURE_TABLE": {
"entry": {
"field": "value",
"state": "disabled"
}
}
}
reload_minigraph_with_golden_config(duthost, new_feature_config)

current_config = get_running_config(duthost)
pytest_assert(
'NEW_FEATURE_TABLE' in current_config and
current_config['NEW_FEATURE_TABLE'] == new_feature_config['NEW_FEATURE_TABLE'],
"new feature config update fail: {}".format(current_config['NEW_FEATURE_TABLE'])
)


def load_minigraph_with_golden_full_config(duthost, full_config):
"""Test Golden Config fully override minigraph config
"""
Expand Down Expand Up @@ -190,7 +169,6 @@ def test_load_minigraph_with_golden_config(duthosts, setup_env,
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
load_minigraph_with_golden_empty_input(duthost)
load_minigraph_with_golden_partial_config(duthost)
load_minigraph_with_golden_new_feature(duthost)
full_config = setup_env
load_minigraph_with_golden_full_config(duthost, full_config)
load_minigraph_with_golden_empty_table_removal(duthost)
39 changes: 0 additions & 39 deletions tests/override_config_table/test_override_config_table_masic.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,44 +154,6 @@ def load_minigraph_with_golden_partial_config(duthost):
)


def load_minigraph_with_golden_new_feature(duthost):
"""Test Golden Config with new feature
"""
new_feature_config = {
"localhost": {
"NEW_FEATURE_TABLE": {
"entry": {
"field": "value",
"state": "disabled"
}
}
},
"asic0": {
"NEW_FEATURE_TABLE": {
"entry": {
"field": "value",
"state": "disabled"
}
}
}
}
reload_minigraph_with_golden_config(duthost, new_feature_config)

host_current_config = get_running_config(duthost)
pytest_assert(
'NEW_FEATURE_TABLE' in host_current_config and
host_current_config['NEW_FEATURE_TABLE'] == new_feature_config['localhost']['NEW_FEATURE_TABLE'],
"new feature config update fail: {}".format(host_current_config['NEW_FEATURE_TABLE'])
)

asic0_current_config = get_running_config(duthost, "asic0")
pytest_assert(
'NEW_FEATURE_TABLE' in asic0_current_config and
asic0_current_config['NEW_FEATURE_TABLE'] == new_feature_config['asic0']['NEW_FEATURE_TABLE'],
"new feature config update fail: {}".format(asic0_current_config['NEW_FEATURE_TABLE'])
)


def load_minigraph_with_golden_empty_table_removal(duthost):
"""Test Golden Config with empty table removal.
Expand Down Expand Up @@ -247,5 +209,4 @@ def test_load_minigraph_with_golden_config(duthosts, setup_env, tbinfo, enum_ran
# since the handling of empty golden config doesn't work on upstream linecards
load_minigraph_with_golden_empty_input(duthost)
load_minigraph_with_golden_partial_config(duthost)
load_minigraph_with_golden_new_feature(duthost)
load_minigraph_with_golden_empty_table_removal(duthost)

0 comments on commit cbd2bfe

Please sign in to comment.