Skip to content

Commit

Permalink
testing: Use explicit log output for github action
Browse files Browse the repository at this point in the history
This will make the tests work.

Signed-off-by: Juan Antonio Osorio <[email protected]>
  • Loading branch information
JAORMX committed Sep 20, 2022
1 parent 6d975cd commit 6998626
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,14 @@ jobs:

- name: Get logs
id: logs
run: kubectl logs -n ${{ matrix.scenario }} myapp -c audittail
run: |
kubectl logs -n ${{ matrix.scenario }} myapp -c audittail
echo "::set-output name=auditlog::$(kubectl logs -n ${{ matrix.scenario }} myapp -c audittail)"
- name: Inspect logs
run: echo ${{ steps.logs.outputs.stdout }}
run: echo ${{ steps.logs.outputs.auditlog }}

- name: Check logs
run: |
echo ${{ steps.logs.outputs.stdout }} | grep "This is an audit log"
echo ${{ steps.logs.outputs.stdout }} | grep "This is an audit log" | wc -l | grep 1
echo ${{ steps.logs.outputs.auditlog }} | grep "This is an audit log"
echo ${{ steps.logs.outputs.auditlog }} | grep "This is an audit log" | wc -l | grep 1

0 comments on commit 6998626

Please sign in to comment.