From bc51bb97ddbb58b66de42ed6c32b9d814309cffd Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 22 Dec 2015 10:53:41 -0600 Subject: [PATCH] No RETURN should be an error for new modules --- ansible_testing/modules.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible_testing/modules.py b/ansible_testing/modules.py index 1196d699e9..928ad176d3 100644 --- a/ansible_testing/modules.py +++ b/ansible_testing/modules.py @@ -400,7 +400,10 @@ class ModuleValidator(Validator): if not bool(examples): self.errors.append('No EXAMPLES provided') if not bool(ret): - self.warnings.append('No RETURN provided') + if self._is_new_module(): + self.errors.append('No RETURN provided') + else: + self.warnings.append('No RETURN provided') else: try: yaml.safe_load(ret)