forked from cloudnative-pg/charts
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Upgrade to 0.14.0 & Add test for replication (#75)
- Loading branch information
1 parent
465878c
commit 80720a4
Showing
14 changed files
with
91 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ kind: Cluster | |
metadata: | ||
name: paradedb-ncc-1701-d | ||
status: | ||
readyInstances: 1 | ||
readyInstances: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
charts/paradedb/test/paradedb-enterprise/03-paradedb_replication_test-assert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: paradedb-enterprise-index-test | ||
status: | ||
succeeded: 1 |
46 changes: 46 additions & 0 deletions
46
charts/paradedb/test/paradedb-enterprise/03-paradedb_replication_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: paradedb-enterprise-index-test | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: data-test | ||
env: | ||
- name: DB_URI | ||
valueFrom: | ||
secretKeyRef: | ||
name: paradedb-ncc-1701-d-app | ||
key: uri | ||
image: alpine:3.19 | ||
command: ['sh', '-c'] | ||
args: | ||
- | | ||
apk --no-cache add postgresql-client | ||
DB_URI="${DB_URI/paradedb-ncc-1701-d-rw/paradedb-ncc-1701-d-ro}" | ||
RESULT=$(psql "$DB_URI" -t) <<-EOSQL | ||
SELECT description | ||
FROM mock_items_paradedb_enterprise | ||
WHERE description @@@ '"bluetooth speaker"~1' | ||
LIMIT 1; | ||
EOSQL | ||
echo -$RESULT- | ||
if [ "$RESULT" = " Bluetooth-enabled speaker" ]; then | ||
echo "Test for description search on replicas passed." | ||
else | ||
echo "Test for description search on replicas failed." | ||
exit 1 | ||
fi | ||
SIZE_RESULT=$(psql "$DB_URI" -t) <<-EOSQL | ||
SELECT pg_size_pretty(pg_relation_size('search_idx_paradedb_enterprise')); | ||
EOSQL | ||
echo -$SIZE_RESULT- | ||
if [ "$SIZE_RESULT" != " 0 bytes" ]; then | ||
echo "Test for index size on replicas passed." | ||
else | ||
echo "Test for index size on replicas failed." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters