Skip to content

Commit

Permalink
test: correct table filtering test (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
fanyang01 authored Jan 2, 2025
1 parent 9358bb7 commit 6246739
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/replication-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
if [ "${{ matrix.source }}" = "postgres" ]; then
SOURCE_DSN="postgres://postgres:[email protected]:5432/test"
else
SOURCE_DSN="mysql://root:[email protected]:3306/test?skip-tables=skip"
SOURCE_DSN="mysql://root:[email protected]:3306/test?skip-tables=test.skip"
fi
docker run -d --name myduck \
Expand Down Expand Up @@ -174,6 +174,19 @@ jobs:
exit 1
fi
# Verify skipped table is empty (for MySQL-compatible databases only)
if [ "${{ matrix.source }}" != "postgres" ]; then
# Check if skip table has any rows
COUNT=$(docker exec myduck psql -t -U postgres -h 127.0.0.1 -c \
"SELECT COUNT(*) FROM ${SCHEMA}.skip;" | tr -d ' ')
if [ "$COUNT" -eq "0" ]; then
echo "Successfully verified that skipped table exists but is empty"
else
echo "Error: Skipped table 'skip' contains $COUNT rows when it should be empty"
exit 1
fi
fi
- name: Test replication of new data
run: |
# Insert new data in source
Expand Down

0 comments on commit 6246739

Please sign in to comment.