Skip to content

Commit

Permalink
update demo testing to include xml to yaml conversion
Browse files Browse the repository at this point in the history
Signed-off-by: Emily McMullan <[email protected]>
  • Loading branch information
eemcmullan committed Oct 23, 2023
1 parent a6109ad commit c574c55
Show file tree
Hide file tree
Showing 3 changed files with 1,288 additions and 559 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Run analysis test and copy output
run: |
RUNNER_IMG=localhost/kantra:latest ./kantra analyze --input $(pwd)/example-applications/example-1/ --output ./output/ --target cloud-readiness
RUNNER_IMG=localhost/kantra:latest ./kantra analyze --input $(pwd)/example-applications/example-1/ --output ./output/ --rules ./test-data/jni-native-code-test.windup.xml
- name: Fail if analysis output does not match expected
run: |
Expand All @@ -42,4 +42,10 @@ jobs:
actual_file=./output/dependencies.yaml
sed 's/^[ \t-]*//' $expected_file | sort -s > /tmp/expected_file
sed 's/^[ \t-]*//' $actual_file | sort -s > /tmp/actual_file
diff /tmp/expected_file /tmp/actual_file || diff $expected_file $actual_file
diff /tmp/expected_file /tmp/actual_file || diff $expected_file $actual_file
- name: Fail if xml rule is not in analysis output as violation
run: |
actual_file=./output/output.yaml
grep violations -A 1 analysis-output.yaml | grep jni-native-code-00000-test -B 1
Loading

0 comments on commit c574c55

Please sign in to comment.