From 8bb10bb225c105e4045af7636cc94a8a08ab4ccd Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Thu, 3 Aug 2017 11:47:17 +1000 Subject: [PATCH] removed requirements on WANT_JSON and POWERSHELL_COMMON (#27679) --- test/sanity/validate-modules/main.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/test/sanity/validate-modules/main.py b/test/sanity/validate-modules/main.py index 8c19630646..c348f974a4 100755 --- a/test/sanity/validate-modules/main.py +++ b/test/sanity/validate-modules/main.py @@ -636,18 +636,12 @@ class ModuleValidator(Validator): ) def _find_ps_replacers(self): - if 'WANT_JSON' not in self.text: - self.reporter.error( - path=self.object_path, - code=206, - msg='WANT_JSON not found in module' - ) - - if REPLACER_WINDOWS not in self.text: + ps_module_util_template = '#Requires -Module Ansible.ModuleUtils.' + if ps_module_util_template not in self.text and REPLACER_WINDOWS not in self.text: self.reporter.error( path=self.object_path, code=207, - msg='"%s" not found in module' % REPLACER_WINDOWS + msg='"%s" not found in module' % ps_module_util_template ) def _find_ps_docs_py_file(self):