Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Oct 8, 2024
1 parent d89be9a commit 3967bad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ci/scripts/e2e-source-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ risedev slt './e2e_test/source/cdc/cdc.check_new_rows.slt'
# drop relations
risedev slt './e2e_test/source/cdc/cdc_share_stream_drop.slt'

echo "--- postgres_query tvf test"
risedev slt './e2e_test/source/tvf/postgres_query.slt'

echo "--- Kill cluster"
risedev ci-kill
export RISINGWAVE_CI=true
Expand Down
8 changes: 8 additions & 0 deletions e2e_test/source/tvf/postgres_query.slt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
system ok
PGHOST=db PGPORT=5432 PGUSER=postgres PGPASSWORD=postgres PGDATABASE=postgres_query psql -c "CREATE TABLE test (id bigint primary key, x int);"

system ok
PGHOST=db PGPORT=5432 PGUSER=postgres PGPASSWORD=postgres PGDATABASE=postgres_query psql -c "INSERT INTO test select id, id::int from generate_series(1, 100) as t(id);"

query II
select * from postgres_scan('db', '5432', 'postgres', 'postgres', 'postgres_query', 'select * from test where id > 90;');

0 comments on commit 3967bad

Please sign in to comment.