diff --git a/test/sanity/validate-modules/main.py b/test/sanity/validate-modules/main.py index b0d1e1a7588..b39038b27e0 100755 --- a/test/sanity/validate-modules/main.py +++ b/test/sanity/validate-modules/main.py @@ -802,7 +802,14 @@ class ModuleValidator(Validator): msg='Module deprecated, but DOCUMENTATION.deprecated is missing' ) - self._validate_docs_schema(doc, doc_schema(self.object_name.split('.')[0]), 'DOCUMENTATION', 305) + if os.path.islink(self.object_path): + # This module has an alias, which we can tell as it's a symlink + # Rather than checking for `module: $filename` we need to check against the true filename + self._validate_docs_schema(doc, doc_schema(os.readlink(self.object_path).split('.')[0]), 'DOCUMENTATION', 305) + else: + # This is the normal case + self._validate_docs_schema(doc, doc_schema(self.object_name.split('.')[0]), 'DOCUMENTATION', 305) + self._check_version_added(doc) self._check_for_new_args(doc)