File tree 1 file changed +4
-2
lines changed
src/sonic-yang-mgmt/tests/libyang-python-tests
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -292,11 +292,13 @@ def test_validate_yang_models(self, sonic_yang_data):
292
292
'''
293
293
test_file = sonic_yang_data ['test_file' ]
294
294
syc = sonic_yang_data ['syc' ]
295
- # Currently only 3 YANG files are not directly related to config
295
+ # Currently only 3 YANG files are not directly related to config, along with event YANG models
296
296
# which are: sonic-extension.yang, sonic-types.yang and sonic-bgp-common.yang. Hard coding
297
297
# it right now.
298
+ # event YANG models do not map directly to config_db and are included to NON_CONFIG_YANG_FILES at run time
298
299
# If any more such helper yang files are added, we need to update here.
299
- NON_CONFIG_YANG_FILES = 3
300
+ EVENT_YANG_FILES = sum (1 for yang_model in syc .yangFiles if 'sonic-events' in yang_model )
301
+ NON_CONFIG_YANG_FILES = 3 + EVENT_YANG_FILES
300
302
# read config
301
303
jIn = self .readIjsonInput (test_file , 'SAMPLE_CONFIG_DB_JSON' )
302
304
jIn = json .loads (jIn )
You can’t perform that action at this time.
0 commit comments