Skip to content

Commit

Permalink
add more test
Browse files Browse the repository at this point in the history
  • Loading branch information
KeXiangWang committed Jan 3, 2024
1 parent ac7b6b7 commit 0bafe88
Show file tree
Hide file tree
Showing 4 changed files with 48 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 @@ -56,6 +56,9 @@ echo "--- inline cdc test"
export MYSQL_HOST=mysql MYSQL_TCP_PORT=3306 MYSQL_PWD=123456
sqllogictest -p 4566 -d dev './e2e_test/source/cdc_inline/**/*.slt'

echo "--- opendal source test"
sqllogictest -p 4566 -d dev './e2e_test/source/opendal/**/*.slt'

echo "--- mysql & postgres cdc validate test"
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.validate.mysql.slt'
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.validate.postgres.slt'
Expand Down
6 changes: 6 additions & 0 deletions e2e_test/source/opendal/data/data1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
carat,cut,color,depth
0.25,Ideal,E,61.4
0.22,Premium,I,62.0
0.28,Good,J,63.1
0.23,Very Good,H,57.5
0.30,Fair,E,64.7
6 changes: 6 additions & 0 deletions e2e_test/source/opendal/data/data2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
carat,cut,color,depth
1.25,Ideal,E,61.4
1.22,Premium,I,62.0
1.28,Good,J,63.1
1.23,Very Good,H,57.5
1.30,Fair,E,64.7
33 changes: 33 additions & 0 deletions e2e_test/source/opendal/posix_fs.slt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
statement ok
SET RW_IMPLICIT_FLUSH TO true;

statement ok
CREATE TABLE diamonds (
carat FLOAT,
cut TEXT,
color TEXT,
depth FLOAT,
) WITH (
connector = 'posix_fs',
match_pattern = 'data*.csv',
posix_fs.root = 'e2e_test/source/opendal/data',
) FORMAT PLAIN ENCODE CSV ( without_header = 'false', delimiter = ',');

sleep 10s

query TTTT rowsort
select * from diamonds;
----
0.22 Premium I 62
0.23 Very Good H 57.5
0.25 Ideal E 61.4
0.28 Good J 63.1
0.3 Fair E 64.7
1.22 Premium I 62
1.23 Very Good H 57.5
1.25 Ideal E 61.4
1.28 Good J 63.1
1.3 Fair E 64.7

statement ok
DROP TABLE diamonds;

0 comments on commit 0bafe88

Please sign in to comment.