-
Task
-
Resolution: Won't Do
-
Normal
-
1.20.0
-
False
-
-
False
-
No
-
RC2
Origin: tests/backup-restore/j08b-verify-user-sso-backup-and-restore.md
Description
Note: this test should only be performed at a time it will not affect other ongoing testing, or on a separate cluster.
In case the current cluster is not available for some reason, you can perform this test case on the "fresh install" cluster
Steps
Postgres
- Login via oc as kubeadmin
- Verify Clients and Realms exist in postgres.
Create a throwaway Postgres instance to access the User SSO Postgres instance
cat << EOF | oc create -f - -n redhat-rhoam-operator apiVersion: integreatly.org/v1alpha1 kind: Postgres metadata: name: throw-away-postgres labels: productName: productName spec: secretRef: name: throw-away-postgres-sec tier: development type: workshop EOF
# Get postgres db host and password to use it later for logging into postgres db oc get secret rhssouser-postgres-rhoam -n redhat-rhoam-operator -o json | jq -r .data.host | base64 --decode oc get secret rhssouser-postgres-rhoam -n redhat-rhoam-operator -o json | jq -r .data.password | base64 --decode # Wait until the throwaway Postgres instance is running oc get pods -n redhat-rhoam-operator | grep throw-away | awk '{print $3}' # oc rsh to the pod oc rsh -n redhat-rhoam-operator $(oc get pods -n redhat-rhoam-operator | grep throw-away | awk '{print $1}') # Log in using host and password retrieved with commands above. psql will prompt for password psql --host=<postgres_db_host> --port=5432 --username=postgres --password --dbname=postgres select * from client; select * from realm;
Once verified. Delete the throwaway Postgres
oc delete -n redhat-rhoam-operator postgres/throw-away-postgres
- Run the backup and restore script
cd test/scripts/backup-restore NS_PREFIX=redhat-rhoam ./j08-verify-user-sso-backup-and-restore.sh | tee test-output.txt
- Wait for the script to finish without errors
- Verify in the test-output.txt log that the test finished successfully.
Note
Sometimes there could be a difference between the DB dump files, caused by a changed order of lines in these files. That is not considered to be an issue. More details: https://issues.redhat.com/browse/MGDAPI-2380