'Check we can run command based artifacts.'

def testArtifactOutput(self):

    with vfs_test_lib.VFSOverrider(rdf_paths.PathSpec.PathType.OS, vfs_test_lib.FakeTestDataVFSHandler):
        self.RunCollectorAndGetCollection(['TestFilesArtifact'], client_mock=self.client_mock)
        self.RunCollectorAndGetCollection(['TestFilesArtifact'], client_mock=self.client_mock, split_output_by_artifact=True)
        with self.assertRaises(RuntimeError) as context:
            self.RunCollectorAndGetCollection(['NullArtifact'], client_mock=self.client_mock, split_output_by_artifact=True, on_no_results_error=True)
        if ('collector    returned    0    responses' not in str(context.exception)):
            raise RuntimeError('0    responses    should    have    been    returned')
