Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/e2e/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1802,8 +1802,8 @@ _record_build_info() {
set_ci_shared_export "build" "${build_info}"
}

restore_4_6_postgres_backup() {
info "Restoring a 4.6 postgres backup"
restore_postgres_backup() {
info "Restoring a postgres backup"

require_environment "API_ENDPOINT"
require_environment "ROX_ADMIN_PASSWORD"
Expand All @@ -1813,10 +1813,10 @@ restore_4_6_postgres_backup() {
if is_CI; then
setup_gcp
fi
gsutil cp gs://stackrox-ci-upgrade-test-fixtures/upgrade-test-dbs/postgres_db_4_6.sql.zip .
gsutil cp gs://stackrox-ci-upgrade-test-fixtures/upgrade-test-dbs/postgres_db_4_10.sql.zip .

roxctl -e "$API_ENDPOINT" --ca "" --insecure-skip-tls-verify \
central db restore --timeout 5m postgres_db_4_6.sql.zip
central db restore --timeout 5m postgres_db_4_10.sql.zip
}

update_public_config() {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ test_e2e() {

# Give some time for previous tests to finish up
wait_for_api
restore_4_6_postgres_backup
restore_postgres_backup

wait_for_api
trap cleanup_workload_identities EXIT
Expand Down
6 changes: 3 additions & 3 deletions tests/upgrade/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ EOT
wait_for_scanner_V4 "$namespace"
}

restore_4_6_backup() {
info "Restoring a 4.6 backup into a newer central"
restore_backup() {
info "Restoring a backup into a newer central"

restore_4_6_postgres_backup
restore_postgres_backup
}

force_rollback() {
Expand Down
8 changes: 4 additions & 4 deletions tests/upgrade/postgres_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ set -euo pipefail

TEST_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd)"

EARLIER_TAG="4.6.2"
EARLIER_SHA="ecff2a443c8b9a2dc7bf606162da89da81dd8e9e"
EARLIER_TAG="4.10.0"
EARLIER_SHA="7b817fa511ac4533cdf2d79a1b8e04d4d7557ad2"
CURRENT_TAG="${MAIN_IMAGE_TAG:-"$(make --quiet --no-print-directory tag)"}"
COLLECTOR_TAG="${MAIN_IMAGE_TAG:-"$(make --quiet --no-print-directory collector-tag)"}"
SCANNER_TAG="${MAIN_IMAGE_TAG:-"$(make --quiet --no-print-directory scanner-tag)"}"
PREVIOUS_RELEASES=("4.6.10" "4.7.9" "4.8.11" "4.9.11" "4.10.7" "4.11.3")
PREVIOUS_RELEASES=("4.10.7" "4.11.3")

# shellcheck source=../../scripts/lib.sh
source "$TEST_ROOT/scripts/lib.sh"
Expand Down Expand Up @@ -96,7 +96,7 @@ test_upgrade_paths() {
wait_for_api
setup_client_TLS_certs

restore_4_6_backup
restore_backup
wait_for_api

# Run with some scale to have data populated to migrate
Expand Down
13 changes: 6 additions & 7 deletions tests/upgrade/postgres_upgrade_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ set -euo pipefail

TEST_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd)"

EARLIER_TAG="4.7.2"
EARLIER_SHA="ef2060ed332c7b8513cb9eb52b9745df9a8285cc"
EARLIER_TAG="4.10.7"
EARLIER_SHA="5a4fced5248e20b2af68fe4bc88df95b40323225"
CURRENT_TAG="${MAIN_IMAGE_TAG:-"$(make --quiet --no-print-directory tag)"}"
PREVIOUS_RELEASES=("4.7.3")

# shellcheck source=../../scripts/lib.sh
source "$TEST_ROOT/scripts/lib.sh"
Expand Down Expand Up @@ -79,7 +78,7 @@ test_upgrade_path() {

local log_output_dir="$1"

FORCE_ROLLBACK_VERSION="4.7.2"
FORCE_ROLLBACK_VERSION="4.10.7"

cd "$REPO_FOR_TIME_TRAVEL"
git checkout "$EARLIER_SHA"
Expand All @@ -99,7 +98,7 @@ test_upgrade_path() {

# It's damn fiddly, restore is needed because later test will search for a
# default secured cluster, created by it :(
restore_4_6_backup
restore_backup
wait_for_api

# Run with some scale to have data populated to migrate
Expand Down Expand Up @@ -191,7 +190,7 @@ test_not_enough_disk_space() {

local log_output_dir="$1"

FORCE_ROLLBACK_VERSION="4.7.2"
FORCE_ROLLBACK_VERSION="4.10.7"

cd "$REPO_FOR_TIME_TRAVEL"
git checkout "$EARLIER_SHA"
Expand All @@ -213,7 +212,7 @@ test_not_enough_disk_space() {

# It's damn fiddly, restore is needed because later test will search for a
# default secured cluster, created by it :(
restore_4_6_backup
restore_backup
wait_for_api

# Do not apply scaled workload to control disk space, do fallocate instead
Expand Down
Loading