You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: postgis/test/check-extension.yaml
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ spec:
9
9
containers:
10
10
- name: data-test
11
11
env:
12
+
- name: EXT_VERSION
13
+
value: ($values.version)
12
14
- name: DB_URI
13
15
valueFrom:
14
16
secretKeyRef:
@@ -20,11 +22,11 @@ spec:
20
22
- |
21
23
set -e
22
24
DB_URI=$(echo $DB_URI | sed "s|/\*|/|")
23
-
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'postgis')" -q)" = "t"
24
-
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'postgis_raster')" -q)" = "t"
25
-
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'postgis_sfcgal')" -q)" = "t"
26
25
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'fuzzystrmatch')" -q)" = "t"
27
-
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'address_standardizer')" -q)" = "t"
28
-
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'address_standardizer_data_us')" -q)" = "t"
29
-
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'postgis_tiger_geocoder')" -q)" = "t"
30
-
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'postgis_topology')" -q)" = "t"
26
+
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'postgis' AND extversion = '${EXT_VERSION}')" -q)" = "t"
27
+
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'postgis_raster' AND extversion = '${EXT_VERSION}')" -q)" = "t"
28
+
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'postgis_sfcgal' AND extversion = '${EXT_VERSION}')" -q)" = "t"
29
+
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'address_standardizer' AND extversion = '${EXT_VERSION}')" -q)" = "t"
30
+
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'address_standardizer_data_us' AND extversion = '${EXT_VERSION}')" -q)" = "t"
31
+
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'postgis_tiger_geocoder AND extversion = '${EXT_VERSION}'')" -q)" = "t"
32
+
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = 'postgis_topology AND extversion = '${EXT_VERSION}'')" -q)" = "t"
Copy file name to clipboardExpand all lines: test/check-extension.yaml
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ spec:
11
11
env:
12
12
- name: EXT_SQL_NAME
13
13
value: ($values.sql_name)
14
+
- name: EXT_VERSION
15
+
value: ($values.version)
14
16
- name: DB_URI
15
17
valueFrom:
16
18
secretKeyRef:
@@ -22,5 +24,5 @@ spec:
22
24
- |
23
25
set -e
24
26
DB_URI=$(echo $DB_URI | sed "s|/\*|/|")
25
-
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = '${EXT_SQL_NAME}')" -q)" = "t"
26
-
echo "Extension '${EXT_SQL_NAME}' is installed!"
27
+
test "$(psql "$DB_URI" -tAc "SELECT EXISTS (SELECT FROM pg_catalog.pg_extension WHERE extname = '${EXT_SQL_NAME}' AND extversion = '${EXT_VERSION}')" -q)" = "t"
28
+
echo "Extension '${EXT_SQL_NAME} v${EXT_VERSION}' is installed!"
0 commit comments