...
DB migrator should configure the database on Istanbul scripts.
Command: /opt/app/policy/bin/db-migrator -s policyadmin -o upgrade
Expected result: schema is created and populated with tables and indexes.
...
Command: /opt/app/policy/bin/db-migrator -s policyadmin -o downgrade -f 0900 -t 0800
Expected result: tables and indexes altered, but no data loss.
...
Command: /opt/app/policy/bin/db-migrator -s policyadmin -o upgrade -f 0800 -t 0900
Expected result: tables and indexes altered, but no data loss.
...
- Upgrade to Honolulu
- Drop a table that is to be altered in Istanbul
- Upgrade to Istanbul
Command: /opt/app/policy/bin/db-migrator -s policyadmin -o upgrade -t 0800; drop table pdpdstatistics; db-migrator -s policyadmin -o upgrade -f 0800 -t 0900
Expected result: script halts at the given table's upgrade script and updates the metadata table to indicate that it failed
- Downgrade to Honolulu
Command: /opt/app/policy/bin/db-migrator -s policyadmin -o downgrade -f 0900 -t 0800
Expected result: script skips the missing table and completes successfully (though it doesn't re-create the table)
- Upgrade to Istanbul
Command: /opt/app/policy/bin/db-migrator -s policyadmin -o upgrade -f 0800 -t 0900
Expected result: script halts at the given table's upgrade script and updates the metadata table to indicate that it failed
...
- Partial downgrade
- Upgrade to Istanbul
- Drop/Alter a table that is to be altered changed in HonoluluIstanbul
- Downgrade to Honolulu
Expected result: script halts at the given table's upgrade downgrade script and updates the metadata table to indicate that it failed
...
- Metadata database fails (No new functionality being tested)
When DB migrator starts, a metadata for historical changes is created/updated.
...
- Database information check failsfails (No new functionality being tested)
Username and password for accessing/creating schemas are invalid.
...