From 7b1ebb51fa50c146428969e8c9ac1897531eed56 Mon Sep 17 00:00:00 2001 From: pemontto Date: Mon, 8 Apr 2019 19:02:02 +1000 Subject: [PATCH] Updates tests --- .gitignore | 1 + .travis.yml | 10 +++++----- tests/data | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) create mode 160000 tests/data diff --git a/.gitignore b/.gitignore index b4a878c..9fc0cb6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ logs/ elk6/vulnwhisperer.ini resources/elk6/vulnwhisperer.ini configs/frameworks_example.ini +tests/data # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/.travis.yml b/.travis.yml index 00abf64..2603323 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,21 +20,21 @@ before_script: script: - python setup.py install # Test successful scan download and parsing - - vuln_whisperer -c configs/test.ini --mock --mock_dir tests/data + - vuln_whisperer -c configs/test.ini --mock - rm -rf /tmp/VulnWhisperer # Test one failed scan - rm -f test/nessus/GET_scans_exports_164_download - - vuln_whisperer -c configs/test.ini --mock --mock_dir tests/data; [[ $? -eq 1 ]] + - vuln_whisperer -c configs/test.ini --mock; [[ $? -eq 1 ]] - rm -rf /tmp/VulnWhisperer # Test two failed scans - rm -f test/qualys_vuln/scan_1553941061.87241 - - vuln_whisperer -c configs/test.ini --mock --mock_dir tests/data; [[ $? -eq 2 ]] + - vuln_whisperer -c configs/test.ini --mock; [[ $? -eq 2 ]] - rm -rf /tmp/VulnWhisperer # Test only nessus - - vuln_whisperer -c configs/test.ini -s nessus --mock --mock_dir tests/data; [[ $? -eq 1 ]] + - vuln_whisperer -c configs/test.ini -s nessus --mock; [[ $? -eq 1 ]] - rm -rf /tmp/VulnWhisperer # Test only qualy_vuln - - vuln_whisperer -c configs/test.ini -s qualys_vuln --mock --mock_dir tests/data; [[ $? -eq 1 ]] + - vuln_whisperer -c configs/test.ini -s qualys_vuln --mock; [[ $? -eq 1 ]] notifications: on_success: change on_failure: change # `always` will be the setting once code changes slow down diff --git a/tests/data b/tests/data new file mode 160000 index 0000000..606b8bc --- /dev/null +++ b/tests/data @@ -0,0 +1 @@ +Subproject commit 606b8bcbe32b057376ea04b9b2e6a0b0e4454006