##### SUMMARY

Support collection roles as integration test targets.

Now that https://github.com/ansible/ansible/issues/59462 has been merged, ansible-test can be updated to support running integration test targets that are collection roles.

The planned convention is to look for targets under `roles/test/` and allow use of target-specific plugins from `plugins/{plugin_type}/test/{target_name}/`.

##### ISSUE TYPE

Feature Idea

##### COMPONENT NAME

ansible-test

##### ADDITIONAL INFORMATION

This will allow integration test targets to be written using collections instead of pre-collection roles.
"""Sanity test script."""
    def __init__(self, path):
        name = os.path.splitext(os.path.basename(path))[0]
        config_path = os.path.splitext(path)[0] + '.json'
        super(SanityCodeSmellTest, self).__init__(name)
        self.path = path
        self.config_path = config_path if os.path.exists(config_path) else None
        self.config = None
        if self.config_path:
            with open(self.config_path, 'r') as config_fd:
                self.config = json.load(config_fd)
        if self.config:
            self.enabled = not self.config.get('disabled')
            self.output = self.config.get('output')  
            self.extensions = self.config.get('extensions')  
            self.prefixes = self.config.get('prefixes')  
            self.files = self.config.get('files')  
            self.text = self.config.get('text')  
            self.ignore_self = self.config.get('ignore_self')  
            self.__all_targets = self.config.get('all_targets')  
            self.__no_targets = self.config.get('no_targets')  
            self.__include_directories = self.config.get('include_directories')  
            self.__include_symlinks = self.config.get('include_symlinks')  
        else:
            self.output = None
            self.extensions = []
            self.prefixes = []
            self.files = []