[sonic-cfggen] Track missing yang models (#10963)

#### Why I did it
sonic-config-engine unit test needs to detect missing yang models.

#### How I did it
Update unit test, return error for missing yang models.

#### How to verify it
Run unit test for sonic-config-engine
This commit is contained in:
ganglv 2023-04-21 13:12:11 +08:00 committed by GitHub
parent d4a5c4781b
commit 8caa32bc55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,6 +83,8 @@ class YangWrapper(object):
except sonic_yang.SonicYangException as e:
print("yang data generated from %s is not valid: %s"%(args.minigraph, str(e)))
return False
if len(self.yang_parser.tablesWithOutYang):
return False
return True
def cmp(file1, file2):