From 0685139ed8e73c7fb050b22dd86b136044207516 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Thu, 23 May 2019 06:37:03 -0700 Subject: [PATCH] Make nova-next archive using --before Change-Id: I4fbd0cb73c73ab680af3f341d6069addb57393fb --- gate/post_test_hook.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gate/post_test_hook.sh b/gate/post_test_hook.sh index b27274b049a4..385d83d4f9e0 100755 --- a/gate/post_test_hook.sh +++ b/gate/post_test_hook.sh @@ -5,8 +5,12 @@ MANAGE="/usr/local/bin/nova-manage" function archive_deleted_rows { # NOTE(danms): Run this a few times to make sure that we end # up with nothing more to archive + if ! $MANAGE $* db archive_deleted_rows --verbose --before "$(date -d yesterday)" 2>&1 | grep 'Nothing was archived'; then + echo "Archiving yesterday data should have done nothing" + return 1 + fi for i in `seq 30`; do - $MANAGE $* db archive_deleted_rows --verbose --max_rows 1000 + $MANAGE $* db archive_deleted_rows --verbose --max_rows 1000 --before "$(date -d tomorrow)" RET=$? if [[ $RET -gt 1 ]]; then echo Archiving failed with result $RET