aboutsummaryrefslogtreecommitdiffstats
path: root/policy-db-migrator/smoke-test
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-11-08 15:52:05 +0000
committeradheli.tavares <adheli.tavares@est.tech>2023-11-08 16:48:57 +0000
commit9fb99a6f5fcc90649342350d7beedd8d4d349012 (patch)
treeb8265753157f9cdbf1a64f7485c2c44b7b5227f2 /policy-db-migrator/smoke-test
parent475cb560f95f37abe84cf3c2c75aa1ff28ee7ba9 (diff)
Remove statistics tables
- added scripts with removal of statistics tables and indexes for upgrade; - added scripts with creation of tables and indexes for downgrade; - fixed the leftover of sequence table when not using it for indexing primary keys. Issue-ID: POLICY-4109 Change-Id: Ic643df87a149d3c27eaa846bd4b46db5d61eda22 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'policy-db-migrator/smoke-test')
-rwxr-xr-xpolicy-db-migrator/smoke-test/mariadb-tests.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/policy-db-migrator/smoke-test/mariadb-tests.sh b/policy-db-migrator/smoke-test/mariadb-tests.sh
index 418a4740..513300c0 100755
--- a/policy-db-migrator/smoke-test/mariadb-tests.sh
+++ b/policy-db-migrator/smoke-test/mariadb-tests.sh
@@ -56,6 +56,11 @@ L_DOWNGRADE_COUNT=$(ls /home/policy/sql/1200/downgrade/*.sql | wc -l)
TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$L_UPGRADE_COUNT))
TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$L_DOWNGRADE_COUNT))
+M_UPGRADE_COUNT=$(ls /home/policy/sql/1300/upgrade/*.sql | wc -l)
+M_DOWNGRADE_COUNT=$(ls /home/policy/sql/1300/downgrade/*.sql | wc -l)
+TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$M_UPGRADE_COUNT))
+TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$M_DOWNGRADE_COUNT))
+
NEW_SQL_EXECUTIONS=0
START_VERSION=""
PREVIOUS_SQL_EXECUTIONS=0
@@ -331,7 +336,7 @@ sleep 5
# Test 13 - Full downgrade
start_test
/opt/app/policy/bin/prepare_downgrade.sh ${SQL_DB}
-/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o downgrade -f 1200 -t 0
+/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o downgrade -f 1300 -t 0
end_test
let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS
check_results $END_STATUS 'downgrade' "${START_VERSION}" "0" $NEW_SQL_EXECUTIONS $TOTAL_SQLS_DOWNGRADE