mirror of
https://github.com/aljazceru/recon-pipeline.git
synced 2025-12-24 01:34:26 +01:00
Add scan tests (#10)
* recon.targets tests added * restructured tests logically * fixed yaml error * fixed job names * recon.__init__ tests added * recon.config tests added * recon.amass.ParseAmassScan tests added * fixed test destined to fail on CI pipeline * testing amass partially complete this commit closes #6 and #8 updated existing tests to utilize new paths
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from pathlib import Path
|
||||
|
||||
import luigi
|
||||
from luigi.util import inherits
|
||||
from luigi.contrib.external_program import ExternalProgramTask
|
||||
@@ -69,7 +71,11 @@ class CORScannerScan(ExternalProgramTask):
|
||||
Returns:
|
||||
luigi.local_target.LocalTarget
|
||||
"""
|
||||
return luigi.LocalTarget(f"{self.results_dir}/corscanner.{self.target_file}.json")
|
||||
results_subfolder = Path(self.results_dir) / "corscanner-results"
|
||||
|
||||
new_path = results_subfolder / "corscanner.json"
|
||||
|
||||
return luigi.LocalTarget(new_path.resolve())
|
||||
|
||||
def program_args(self):
|
||||
""" Defines the options/arguments sent to tko-subs after processing.
|
||||
@@ -77,6 +83,7 @@ class CORScannerScan(ExternalProgramTask):
|
||||
Returns:
|
||||
list: list of options/arguments, beginning with the name of the executable to run
|
||||
"""
|
||||
Path(self.output().path).parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
command = [
|
||||
"python3",
|
||||
|
||||
Reference in New Issue
Block a user