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:
epi052
2020-01-30 17:25:42 -06:00
committed by GitHub
parent 2793284426
commit 1d5155f930
270 changed files with 21695 additions and 100 deletions

View File

@@ -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",