Skip to content

Commit 6818e60

Browse files
committed
Populating postgresql database
1 parent 44eb760 commit 6818e60

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

test/scripts/createPostgreSQL.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ done
1818
# ensure postgresql pod is deployed and Ready
1919
oc wait pod $PGPOD -n ${YAKS_NAMESPACE} --for condition=Ready
2020

21-
# populate database with dummy data
22-
oc rsh -n ${YAKS_NAMESPACE} $PGPOD \
23-
psql -U camel-k-example example \
24-
-c "CREATE TABLE descriptions (id varchar(10), info varchar(30));INSERT INTO descriptions (id, info) VALUES ('SO2', 'Nitric oxide is a free radical');INSERT INTO descriptions (id, info) VALUES ('NO2', 'Toxic gas');"
21+
oc rsync $PGPOD:/tmp/sql/ sql
22+
23+
oc rsh -n ${YAKS_NAMESPACE} $PGPOD /tmp/sql/populate.sh

test/sql/populate.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
psql -U camel-k-example example \
2+
-c "CREATE TABLE descriptions (id varchar(10), info varchar(30));INSERT INTO descriptions (id, info) VALUES ('SO2', 'Nitric oxide is a free radical');INSERT INTO descriptions (id, info) VALUES ('NO2', 'Toxic gas');"

0 commit comments

Comments
 (0)