Skip to content

Commit 3089b44

Browse files
committed
tests: added e2e tests
1 parent 4c9d7db commit 3089b44

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

test/scenarios/all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ bash $E2E_THIS_DIR/scenario-11-code-csvreport.sh
2525
bash $E2E_THIS_DIR/scenario-12-image-scan-local-docker-image.sh
2626
bash $E2E_THIS_DIR/scenario-13-image-scan-with-local-tar.sh
2727
bash $E2E_THIS_DIR/scenario-14-image-scan-with-remote-registry.sh
28+
bash $E2E_THIS_DIR/scenario-15-enricher-auto-switch.sh
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -x
4+
5+
# Run the command and capture output
6+
$E2E_VET_SCAN_CMD \
7+
--malware \
8+
--report-markdown-summary=sum.md 2>&1 | tee scenario-output.log
9+
10+
# Check if the free plan message appears in stdout
11+
echo "Checking for free plan message in stdout..."
12+
if grep -q "On-demand malicious package scanning is not available on the Free plan" scenario-output.log; then
13+
echo "✓ Free plan message found in stdout"
14+
else
15+
echo "✗ Free plan message NOT found in stdout"
16+
exit 1
17+
fi
18+
19+
# Check if similar message exists in sum.md
20+
echo "Checking for upgrade message in sum.md..."
21+
if grep -q -i "upgrade\|free plan\|on-demand" sum.md; then
22+
echo "✓ Upgrade/free plan message found in sum.md"
23+
else
24+
echo "✗ Upgrade/free plan message NOT found in sum.md"
25+
exit 1
26+
fi
27+
28+
echo "All checks passed!"

0 commit comments

Comments
 (0)