Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit acba274

Browse files
committed
Add integration test for ScanType not found error
1 parent 706c1e1 commit acba274

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ jobs:
264264
run: |
265265
cd tests/integration/
266266
npm ci
267+
- name: "Generic Integration Tests"
268+
run: |
269+
cd tests/integration/
270+
npx jest --ci --color no-scan-definition-error
267271
- name: "Nmap Integration Tests"
268272
run: |
269273
helm -n integration-tests install nmap ./integrations/nmap/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const { scan } = require('./helpers')
2+
3+
test(
4+
"invalid port scan should be marked as errored",
5+
async () => {
6+
await expect(scan(
7+
"scan-type-not-found",
8+
"this-type-does-not-exists",
9+
[],
10+
30
11+
)).rejects.toThrow(`Scan failed with description "Configured ScanType 'this-type-does-not-exists' not found in Scans Namespace. You'll likely need to deploy the ScanType."`);
12+
},
13+
1 * 60 * 1000
14+
);

0 commit comments

Comments
 (0)