Skip to content

Commit

Permalink
test(annotations): print logs for annotations bats tests (project-zot…
Browse files Browse the repository at this point in the history
…#1680)

Signed-off-by: Laurentiu Niculae <[email protected]>
  • Loading branch information
laurentiuNiculae authored Aug 7, 2023
1 parent 76277f5 commit ed90e3b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/ecosystem-tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
with:
cache: false
go-version: 1.20.x
- uses: ./.github/actions/clean-runner
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
Expand Down Expand Up @@ -52,6 +53,21 @@ jobs:
make bin/dex
./bin/dex serve $GITHUB_WORKSPACE/test/dex/config-dev.yaml &
cd $GITHUB_WORKSPACE
- name: Check disk space before build
run: |
cd $GITHUB_WORKSPACE
set -x
df -h
sudo ls -lRh /tmp/* || true
sudo du -sh /tmp || true
sudo du -sh /tmp/* || true
sudo find /tmp/ -size +5M | sudo xargs ls -lh
du -sh ./* || true
find ./ -size +5M | xargs ls -lh
sudo du -sh /var/
sudo du -sh /var/lib/docker/
du -sh /home/runner/work/
set +x
- name: Run referrers tests
run: |
make test-bats-referrers
Expand Down Expand Up @@ -95,3 +111,19 @@ jobs:
env:
AWS_ACCESS_KEY_ID: fake
AWS_SECRET_ACCESS_KEY: fake
- name: Check disk space after build
if: always()
run: |
cd $GITHUB_WORKSPACE
set -x
df -h
sudo ls -lRh /tmp/* || true
sudo du -sh /tmp || true
sudo du -sh /tmp/* || true
sudo find /tmp/ -size +5M | sudo xargs ls -lh
du -sh ./* || true
find ./ -size +5M | xargs ls -lh
sudo du -sh /var/
sudo du -sh /var/lib/docker/
du -sh /home/runner/work/
set +x
4 changes: 3 additions & 1 deletion test/blackbox/annotations.bats
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ function setup_file() {
"port": "8080"
},
"log": {
"level": "debug"
"level": "debug",
"output": "${BATS_FILE_TMPDIR}/zot.log"
},
"extensions":{
"search": {
Expand Down Expand Up @@ -57,6 +58,7 @@ EOF
}

function teardown_file() {
cat ${BATS_FILE_TMPDIR}/zot.log >&3
local zot_root_dir=${BATS_FILE_TMPDIR}/zot
local oci_data_dir=${BATS_FILE_TMPDIR}/oci
local roots_data_dir=${BATS_FILE_TMPDIR}/roots
Expand Down

0 comments on commit ed90e3b

Please sign in to comment.