Skip to content

Commit 696ea87

Browse files
authored
Merge pull request #194 from datastax/issue/CDM-93
CDM-93: Added SIT tests
2 parents b98aa26 + 7e933f2 commit 696ea87

File tree

7 files changed

+62
-0
lines changed

7 files changed

+62
-0
lines changed

SIT/smoke/05_reserved_keyword/cdm.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash -e
2+
3+
cat <<EOF
4+
!!!!!!!!
5+
!!!!!!!! Testing Migrate
6+
!!!!!!!!
7+
EOF
8+
9+
/local/cdm.sh -c
10+
spark-submit \
11+
--properties-file /smoke/05_reserved_keyword/migrate.properties \
12+
--master "local[*]" \
13+
--class datastax.cdm.job.Migrate /local/cassandra-data-migrator.jar
14+
15+
cat <<EOF
16+
!!!!!!!!
17+
!!!!!!!! Testing DiffData
18+
!!!!!!!!
19+
EOF
20+
21+
spark-submit \
22+
--properties-file /smoke/05_reserved_keyword/migrate.properties \
23+
--master "local[*]" \
24+
--class datastax.cdm.job.DiffData /local/cassandra-data-migrator.jar

SIT/smoke/05_reserved_keyword/cdm.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
migrateData com.datastax.cdm.job.Migrate migrate.properties
2+
validateData com.datastax.cdm.job.DiffData migrate.properties
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash -e
2+
3+
workingDir="$1"
4+
cd "$workingDir"
5+
6+
for scenario in $(cat cdm.txt | awk '{print $1}'); do
7+
/local/cdm.sh -f cdm.txt -s $scenario -d "$workingDir"
8+
done
9+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT * FROM target.smoke_order;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
col1 | order
3+
------+-------
4+
c1 | o1
5+
c2 | o2
6+
7+
(2 rows)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
spark.cdm.connect.origin.host cdm-sit-cass
2+
spark.cdm.connect.target.host cdm-sit-cass
3+
4+
spark.cdm.schema.origin.keyspaceTable origin.smoke_order
5+
spark.cdm.schema.target.keyspaceTable target.smoke_order
6+
spark.cdm.perfops.numParts 1
7+
8+
spark.cdm.autocorrect.missing true
9+
spark.cdm.autocorrect.mismatch true
10+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
DROP TABLE IF EXISTS origin.smoke_order;
2+
CREATE TABLE origin.smoke_order (col1 text primary key, "order" text);
3+
INSERT INTO origin.smoke_order(col1, "order") VALUES ('c1','o1');
4+
INSERT INTO origin.smoke_order(col1, "order") VALUES ('c2','o2');
5+
6+
DROP TABLE IF EXISTS target.smoke_order;
7+
CREATE TABLE target.smoke_order (col1 text primary key, "order" text);
8+
9+

0 commit comments

Comments
 (0)