Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Move _get_tests() call to execute() that has action_args
Browse files Browse the repository at this point in the history
  • Loading branch information
anxstj committed Sep 28, 2022
1 parent 1c03a55 commit 154afce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions molecule_goss/goss.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ def __init__(self, config=None):
:return: None
"""
super(Goss, self).__init__(config)
if config:
self._tests = self._get_tests()

@property
def name(self):
Expand All @@ -123,6 +121,11 @@ def execute(self, action_args=None):
LOG.warning(msg)
return

if self._config:
self._tests = self._get_tests(action_args)
else:
self._tests = []

if not len(self._tests) > 0:
msg = "Skipping, no tests found."
LOG.warning(msg)
Expand Down

0 comments on commit 154afce

Please sign in to comment.