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

Commit bcf3b3b

Browse files
committed
Add kube-hunter integration test
1 parent 4a47e72 commit bcf3b3b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
const { scan } = require("./helpers");
2+
3+
test(
4+
"kube-hunter should find a fixed number of findings for the kind cluster",
5+
async () => {
6+
const { categories, severities, count } = await scan(
7+
"kube-hunter-in-cluster",
8+
"kube-hunter",
9+
["--pod"],
10+
120
11+
);
12+
13+
expect(count).toBe(5);
14+
expect(categories).toMatchInlineSnapshot(`
15+
Object {
16+
"Access Risk": 3,
17+
"Information Disclosure": 2,
18+
}
19+
`);
20+
expect(severities).toMatchInlineSnapshot(`
21+
Object {
22+
"low": 3,
23+
"medium": 2,
24+
}
25+
`);
26+
},
27+
3 * 60 * 1000
28+
);

0 commit comments

Comments
 (0)