Skip to content

Commit

Permalink
Remove event yang models from test count (sonic-net#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbud-msft committed Oct 5, 2022
1 parent d389d89 commit 3183e88
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,13 @@ def test_validate_yang_models(self, sonic_yang_data):
'''
test_file = sonic_yang_data['test_file']
syc = sonic_yang_data['syc']
# Currently only 3 YANG files are not directly related to config
# Currently only 3 YANG files are not directly related to config, along with event YANG models
# which are: sonic-extension.yang, sonic-types.yang and sonic-bgp-common.yang. Hard coding
# it right now.
# event YANG models do not map directly to config_db and are included to NON_CONFIG_YANG_FILES at run time
# If any more such helper yang files are added, we need to update here.
NON_CONFIG_YANG_FILES = 3
EVENT_YANG_FILES = sum(1 for yang_model in syc.yangFiles if 'sonic-events' in yang_model)
NON_CONFIG_YANG_FILES = 3 + EVENT_YANG_FILES
# read config
jIn = self.readIjsonInput(test_file, 'SAMPLE_CONFIG_DB_JSON')
jIn = json.loads(jIn)
Expand Down

0 comments on commit 3183e88

Please sign in to comment.