Skip to content

[202503] Fix tests/override_config_table/test_override_config_table_masic.py to support LT2 / FT2#1042

Open
kazinator-arista wants to merge 2 commits intoAzure:202503from
kazinator-arista:msft-202503
Open

[202503] Fix tests/override_config_table/test_override_config_table_masic.py to support LT2 / FT2#1042
kazinator-arista wants to merge 2 commits intoAzure:202503from
kazinator-arista:msft-202503

Conversation

@kazinator-arista
Copy link
Copy Markdown

These changes are very similar to #928.

They target the multi-ASIC version of the test case.

Two changes are made to the function load_minigraph_with_golden_empty_input.

The enhancement is to gather the names of all tables for which a mismatch occur so that the assertion lists all of them, rather than just the first one.

The second is to add exceptions for the "FEATURE" and "PORT" tables. With this change, the rest of the test case passes.

* tests/override_config_table/test_override_config_table_masic.py
(load_minigraph_with_golden_empty_input): This function
asserts on the first discrepancy found. We instead gather the
(asic, table) tuples into a list, and assert if the list is
not empty, showing the list in the assertion message.
(This change was already implemented for the non-msaic version
of the test case.)

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_masic.py
(GOLDEN_OVERRIDDEN_TABLES): New variable.
(load_minigraph_with_golden_empty_input): Skip tables found in
GOLDEN_OVERRIDDEN_TABLES.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant