Skip to content

Commit 4c13a93

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Make nova-next archive using --before"
2 parents d7bad34 + 0685139 commit 4c13a93

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gate/post_test_hook.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ MANAGE="/usr/local/bin/nova-manage"
55
function archive_deleted_rows {
66
# NOTE(danms): Run this a few times to make sure that we end
77
# up with nothing more to archive
8+
if ! $MANAGE $* db archive_deleted_rows --verbose --before "$(date -d yesterday)" 2>&1 | grep 'Nothing was archived'; then
9+
echo "Archiving yesterday data should have done nothing"
10+
return 1
11+
fi
812
for i in `seq 30`; do
9-
$MANAGE $* db archive_deleted_rows --verbose --max_rows 1000
13+
$MANAGE $* db archive_deleted_rows --verbose --max_rows 1000 --before "$(date -d tomorrow)"
1014
RET=$?
1115
if [[ $RET -gt 1 ]]; then
1216
echo Archiving failed with result $RET

0 commit comments

Comments
 (0)