Skip to content

Commit

Permalink
update TS7 test
Browse files Browse the repository at this point in the history
  • Loading branch information
FxKu committed Sep 20, 2024
1 parent 3b82cea commit 77ff352
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions postgres-appliance/tests/test_spilo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,12 @@ function verify_archive_mode_is_on() {
function verify_hourly_log_rotation() {
log_rotation_age=$(docker_exec "$1" "psql -U postgres -tAc \"SHOW log_rotation_age\"")
log_filename=$(docker_exec "$1" "psql -U postgres -tAc \"SHOW log_filename\"")
# we expect 8x24 foreign tables (+8 already existing tables when init with daily rotation)
# we expect 8x24 foreign tables and views + 8 views for daily logs and failed authentications
postgres_log_ftables=$(docker_exec "$1" "psql -U postgres -tAc \"SELECT count(*) FROM pg_foreign_table WHERE ftrelid::regclass::text LIKE 'postgres_log_%'\"")
postgres_log_views=$(docker_exec "$1" "psql -U postgres -tAc \"SELECT count(*) FROM pg_views WHERE viewname LIKE 'postgres_log_%'\"")
postgres_failed_auth_views=$(docker_exec "$1" "psql -U postgres -tAc \"SELECT count(*) FROM pg_views WHERE viewname LIKE 'failed_authentication_%'\"")

[ "$log_rotation_age" = "1h" ] && [ "$log_filename" = "postgresql-%u-%H.log" ] && [ "$postgres_log_ftables" -ge 192 ] && [ "$postgres_failed_auth_views" -ge 192 ]
[ "$log_rotation_age" = "1h" ] && [ "$log_filename" = "postgresql-%u-%H.log" ] && [ "$postgres_log_ftables" -eq 192 ] && [ "$postgres_log_views" -eq 8 ] && [ "$postgres_failed_auth_views" -eq 200 ]
}

# TEST SUITE 1 - In-place major upgrade 12->13->...->16
Expand Down

0 comments on commit 77ff352

Please sign in to comment.