Skip to content

Commit 831868a

Browse files
committed
refine e2e test
1 parent 142a62c commit 831868a

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

ci/docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ services:
7777
- db
7878
- message_queue
7979
- schemaregistry
80+
- mongodb
81+
- mongodb-setup
82+
- mongo_data_generator
8083
volumes:
8184
- ..:/risingwave
8285

@@ -213,9 +216,8 @@ services:
213216

214217
mongodb:
215218
image: mongo:4.4
216-
container_name: mongodb
217219
ports:
218-
- "27017:27017"
220+
- "27017"
219221
command: --replSet rs0 --oplogSize 128
220222
restart: always
221223
healthcheck:

ci/scripts/e2e-source-test.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@ echo "--- starting risingwave cluster"
6161
RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=info" \
6262
cargo make ci-start ci-1cn-1fe-with-recovery
6363

64+
echo "--- mongodb cdc test"
65+
# install the mongo shell
66+
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
67+
wget https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/4.4/multiverse/binary-amd64/mongodb-org-shell_4.4.28_amd64.deb
68+
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
69+
sudo dpkg -i mongodb-org-shell_4.4.28_amd64.deb
70+
71+
echo '> ping mongodb'
72+
echo 'db.runCommand({ping: 1})' | mongo
73+
echo '> rs config'
74+
echo 'rs.conf()' | mongo
75+
echo '> run test..'
76+
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/mongodb/**/*.slt'
77+
6478
echo "--- inline cdc test"
6579
export MYSQL_HOST=mysql MYSQL_TCP_PORT=3306 MYSQL_PWD=123456
6680
sqllogictest -p 4566 -d dev './e2e_test/source/cdc_inline/**/*.slt'

e2e_test/source/cdc_inline/mongodb/mongo_basic.slt renamed to e2e_test/source/cdc/mongodb/mongo_basic.slt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ control substitution on
44
statement ok
55
CREATE TABLE users (_id JSONB PRIMARY KEY, payload JSONB) WITH (
66
connector = 'mongodb-cdc',
7-
mongodb.url = 'mongodb://localhost:27017/?replicaSet=rs0',
7+
mongodb.url = 'mongodb://mongodb:27017/?replicaSet=rs0',
88
collection.name = 'random_data.*'
99
);
1010

0 commit comments

Comments
 (0)