Fix "override config" tests to support LT2/FT2#22696
Open
kazinator-arista wants to merge 2 commits intosonic-net:masterfrom
Open
Fix "override config" tests to support LT2/FT2#22696kazinator-arista wants to merge 2 commits intosonic-net:masterfrom
kazinator-arista wants to merge 2 commits intosonic-net:masterfrom
Conversation
* tests/override_config_table/test_override_config_table.py (load_minigraph_with_golden_empty_input): This function asserts on the first discrepancy found. We instead gather the names of the nonmatching tables into a list, and assert if the list is not empty, showing the list in the assertion message. * tests/override_config_table/test_override_config_table_masic.py: Similar changes to multi-asic version of test (load_minigraph_with_golden_empty_input): The difference is that rather than gathering names of nonmatching tables, we have (asic, tasble) tuples.
In the test case test_load_minigraph_with_golden_config, the function load_minigraph_with_golden_empty_input asserts. This function expects all the tables to be identical after the golden config is overridden to be empty. But it looks as if the golden config is the source of several configurations: the "BMP" table, and "fec" : "rs" entries in the "PORT". Thus, when the golden config is replaced with an empty configuration, the entire "BMP" table, well as those "fec" properties in the "PORT" table, disappear. We propose a variable GOLDEN_OVERRIDDEN_TABLES for additional tables which that function should skip. This is similar to the existing variable NON_USER_CONFIG_TABLES which non-user-config tables that need to be skipped. tests/override_config_table/test_override_config_table.py (GOLDEN_OVERRIDDEN_TABLES): New variable. (load_minigraph_with_golden_empty_input): Skip tables found in GOLDEN_OVERRIDDEN_TABLES. tests/override_config_table/test_override_config_table_masic.py: Same changes as in test_override_config_table.py.
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
This PR gets two test cases working, which fail due to finding a discrepancy
in two tables.
The fix is to ignore the FEATURE and PORT tables in the test, which
have some run-time configuration state that is altered when the golden
config is overridden empty. FEATURE is missing the "BMP" node, and
records in PORT are missing "fec" : "rs" fields.
The first commit in the PR is an improvement in the diagnostic that occurs
when these tests fail due to a configuration discrepancy. Rather than stopping
on the first discrepancy (non-matching configuration table), all mismatches
are identified, and reported in a single exception.
Type of change
Back port request
How did you verify/test it?
Failing tests went green on LT2 and FT2 DUTs in our test bed, without regressions in numerous other duts.