fix(vector): track packaged migrations in restore smoke
This commit is contained in:
@@ -390,10 +390,12 @@ PY
|
||||
-XAt -U "$THT_VECTOR_BOOTSTRAP_USER" -d thoth --command \
|
||||
"SELECT content_hash <> 'mutated-after-backup' FROM vectors.memory WHERE record_key = '$marker'")
|
||||
test "$restored" = t
|
||||
pending=$(docker exec -e PGPASSWORD="$new_bootstrap_password" "$restore_container" psql \
|
||||
expected_migrations=$(find harness/tht/migrations/vector -type f -name '[0-9][0-9][0-9]_*.sql' \
|
||||
-exec basename {} \; | sed 's/_.*//' | sort | paste -sd, -)
|
||||
applied_migrations=$(docker exec -e PGPASSWORD="$new_bootstrap_password" "$restore_container" psql \
|
||||
-XAt -U "$THT_VECTOR_BOOTSTRAP_USER" -d thoth --command \
|
||||
"SELECT count(*) = 3 FROM public.tht_vector_migrations")
|
||||
test "$pending" = t
|
||||
"SELECT string_agg(version, ',' ORDER BY version) FROM public.tht_vector_migrations")
|
||||
test "$applied_migrations" = "$expected_migrations"
|
||||
dimensions=$(docker exec -e PGPASSWORD="$new_bootstrap_password" "$restore_container" psql \
|
||||
-XAt -U "$THT_VECTOR_BOOTSTRAP_USER" -d thoth --command \
|
||||
"SELECT count(*) = 3 FROM pg_attribute a JOIN pg_class c ON c.oid=a.attrelid
|
||||
|
||||
Reference in New Issue
Block a user