Skip to content

Commit 4fcae2a

Browse files
committed
Add a GeoJSON assertion to the PostGIS Kuttl test
Issue: [sc-13236]
1 parent 98d3c5f commit 4fcae2a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

testing/kuttl/e2e-other/postgis-cluster/01--psql-connect.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,17 @@ spec:
116116
echo "$RESULT"
117117
exit 1
118118
fi
119+
120+
# check GeoJSON function
121+
RESULT=$(psql -c "DO \$\$
122+
DECLARE
123+
result text;
124+
BEGIN
125+
SELECT ST_AsText(ST_AsGeoJSON('SRID=4326;POINT(-118.4079 33.9434)'::geography)) INTO result;
126+
ASSERT result = 'POINT(-118.4079 33.9434)', 'GeoJSON check failed';
127+
END \$\$;" 2>&1)
128+
129+
if [[ "$RESULT" == *"ERROR"* ]]; then
130+
echo "$RESULT"
131+
exit 1
132+
fi

0 commit comments

Comments
 (0)