Update test

This commit is contained in:
pemontto
2019-04-16 17:33:30 +10:00
parent a7ae44f981
commit c3fb65e67a
2 changed files with 8 additions and 8 deletions

View File

@ -31,23 +31,23 @@ script:
- python setup.py install
# Test successful scan download and parsing
- rm -rf /tmp/VulnWhisperer
- vuln_whisperer -c configs/test.ini --mock --mock_dir ${TEST_PATH}
- vuln_whisperer -F -c configs/test.ini --mock --mock_dir ${TEST_PATH}
# Run a second time with no scans to import
- vuln_whisperer -c configs/test.ini --mock --mock_dir ${TEST_PATH}
- vuln_whisperer -F -c configs/test.ini --mock --mock_dir ${TEST_PATH}
# Test one failed scan
- rm -rf /tmp/VulnWhisperer
- rm -f ${TEST_PATH}/nessus/GET_scans_exports_164_download
- vuln_whisperer -c configs/test.ini --mock --mock_dir ${TEST_PATH}; [[ $? -eq 1 ]]
- vuln_whisperer -F -c configs/test.ini --mock --mock_dir ${TEST_PATH}; [[ $? -eq 1 ]]
# Test two failed scans
- rm -rf /tmp/VulnWhisperer
- rm -f ${TEST_PATH}/qualys_vuln/scan_1553941061.87241
- vuln_whisperer -c configs/test.ini --mock --mock_dir ${TEST_PATH}; [[ $? -eq 2 ]]
- vuln_whisperer -F -c configs/test.ini --mock --mock_dir ${TEST_PATH}; [[ $? -eq 2 ]]
# Test only nessus
- rm -rf /tmp/VulnWhisperer
- vuln_whisperer -c configs/test.ini -s nessus --mock --mock_dir ${TEST_PATH}; [[ $? -eq 1 ]]
- vuln_whisperer -F -c configs/test.ini -s nessus --mock --mock_dir ${TEST_PATH}; [[ $? -eq 1 ]]
# Test only qualy_vuln
- rm -rf /tmp/VulnWhisperer
- vuln_whisperer -c configs/test.ini -s qualys_vuln --mock --mock_dir ${TEST_PATH}; [[ $? -eq 1 ]]
- vuln_whisperer -F -c configs/test.ini -s qualys_vuln --mock --mock_dir ${TEST_PATH}; [[ $? -eq 1 ]]
- bash tests/test-docker.sh
notifications:
on_success: change

View File

@ -21,14 +21,14 @@ elasticsearch_url="localhost:9200"
logstash_url="localhost:9600"
until curl -s "$elasticsearch_url/_cluster/health?pretty" | grep '"status"' | grep -qE "green|yellow"; do
curl -s "$elasticsearch_url/_cluster/health?pretty"
yellow $(curl -s "$elasticsearch_url/_cluster/health?pretty")
yellow "\nWaiting for Elasticsearch..."
sleep 5
done
curl -s "$elasticsearch_url/_cluster/health?pretty"
until [[ $(curl -s "$logstash_url/_node/stats" | jq '.events.out') == 1236 ]] ; do
curl -s "$logstash_url/_node/stats" | jq '.events'
yellow $(curl -s "$logstash_url/_node/stats" | jq '.events')
yellow "\nWaiting for Logstash load to finish..."
sleep 10
done