Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scanners/trivy/integration-tests/trivy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,23 @@ test(
3 * 60 * 1000
);

test.skip( // TODO: Remove skip if issue fixed
test(
"trivy k8s scan should not fail",
async () => {
const { categories, severities, count } = await scan(
"trivy-k8s-test",
"trivy-k8s",
["cluster"],
// scanners is limited to config, and namespace to default to reduce the time of the test
["cluster", "--debug","--scanners", "config", "--namespace", "default"],
10 * 60 * 1000
);

// since the state of the k8s cluster in the test environment cannot be predicted, only the structure of the result is assured here
expect(count).toBeGreaterThanOrEqual(1);

const categoryNames = Object.keys(categories);
expect(categoryNames).toHaveLength(2);
expect(categoryNames).toHaveLength(1);
expect(categoryNames.includes("Misconfiguration")).toBeTruthy();
expect(categoryNames.includes("Vulnerability")).toBeTruthy();

const severityNames = Object.keys(severities);
expect(severityNames).toHaveLength(3);
Expand Down