From 8607e2236a4dbea0bb28f9360eb54c6021068be5 Mon Sep 17 00:00:00 2001 From: Naramsim Date: Fri, 23 Jan 2026 19:46:42 +0100 Subject: [PATCH 1/2] cicd: test encounters endpoint --- .github/workflows/database.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index e22a1811b..40fccb454 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -43,7 +43,9 @@ jobs: - name: Dump DB run: stat db.sqlite3 - name: Test data - run: curl -Ss http://localhost:8000/api/v2/pokemon/1/ | grep -q 'bulbasaur' + run: | + curl -Ss http://localhost:8000/api/v2/pokemon/11/ | grep -q 'metapod' + curl -Ss http://localhost:8000/api/v2/pokemon/11/encounters | grep -q 'eterna-forest-area' postgres: runs-on: ubuntu-latest steps: @@ -69,4 +71,6 @@ jobs: docker compose cp ./pokeapi.dump db:/tmp/ docker compose exec -T -u postgres db sh -c "cd /tmp && pg_restore -h localhost -U ash -d pokeapi pokeapi.dump" - name: Test data - run: curl -Ss http://localhost/api/v2/pokemon/1/ | grep -q 'bulbasaur' + run: | + curl -Ss http://localhost:8000/api/v2/pokemon/11/ | grep -q 'metapod' + curl -Ss http://localhost:8000/api/v2/pokemon/11/encounters | grep -q 'eterna-forest-area' From 482503096b618951f5fcdf3dd530eb404fc4d745 Mon Sep 17 00:00:00 2001 From: Naramsim Date: Fri, 23 Jan 2026 20:26:38 +0100 Subject: [PATCH 2/2] try: sleep --- .github/workflows/database.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 40fccb454..149a01989 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -72,5 +72,6 @@ jobs: docker compose exec -T -u postgres db sh -c "cd /tmp && pg_restore -h localhost -U ash -d pokeapi pokeapi.dump" - name: Test data run: | - curl -Ss http://localhost:8000/api/v2/pokemon/11/ | grep -q 'metapod' - curl -Ss http://localhost:8000/api/v2/pokemon/11/encounters | grep -q 'eterna-forest-area' + sleep 10 + curl -Ss http://localhost:8000/api/v2/pokemon/1/ | grep -q 'bulbasaur' + curl -Ss http://localhost:8000/api/v2/pokemon/1/encounters | grep -q '['