Skip to content

Commit f63f5ea

Browse files
committed
USHIFT-6718: Update test scenarios
1 parent 6dabd39 commit f63f5ea

4 files changed

Lines changed: 32 additions & 28 deletions

File tree

test/scenarios/presubmits/el98-src@rpm-install.sh.disabled

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,18 @@ EOF
4343

4444
configure_rhocp_repo() {
4545
local -r rhocp=$1
46-
local -r version=$2
46+
local -r major=$2
47+
local -r minor=$3
4748

4849
# The repository may be empty if the beta mirror is not up yet
4950
if [[ -z "${rhocp}" ]] ; then
5051
return
5152
fi
5253

53-
if [[ "${rhocp}" =~ ^[0-9]{2} ]]; then
54-
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
54+
if [[ "${rhocp}" =~ ^[0-9]{1,2}$ ]]; then
55+
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-${major}.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
5556
elif [[ "${rhocp}" =~ ^http ]]; then
56-
local -r ocp_repo_name="rhocp-4.${version}-for-rhel-9-mirrorbeta-rpms"
57+
local -r ocp_repo_name="rhocp-${major}.${minor}-for-rhel-9-mirrorbeta-rpms"
5758
local -r tmp_file=$(mktemp)
5859

5960
tee "${tmp_file}" >/dev/null <<EOF
@@ -100,10 +101,10 @@ scenario_run_tests() {
100101
# Note that rhocp or beta dependencies repository may not yet exist
101102
# for the current version. Then, just use whatever we can get for
102103
# the previous minor version.
103-
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MINOR_VERSION}"
104-
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MINOR_VERSION}"
105-
configure_rhocp_repo "${RHOCP_MINOR_Y1}" "${PREVIOUS_MINOR_VERSION}"
106-
configure_rhocp_repo "${RHOCP_MINOR_Y1_BETA}" "${PREVIOUS_MINOR_VERSION}"
104+
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MAJOR_VERSION}" "${MINOR_VERSION}"
105+
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MAJOR_VERSION}" "${MINOR_VERSION}"
106+
configure_rhocp_repo "${RHOCP_MINOR_Y1}" "${PREVIOUS_MAJOR_VERSION}" "${PREVIOUS_MINOR_VERSION}"
107+
configure_rhocp_repo "${RHOCP_MINOR_Y1_BETA}" "${PREVIOUS_MAJOR_VERSION}" "${PREVIOUS_MINOR_VERSION}"
107108
configure_microshift_mirror "${PREVIOUS_RELEASE_REPO}"
108109
run_command_on_vm host1 "sudo subscription-manager repos --enable fast-datapath-for-rhel-9-\$(uname -m)-rpms"
109110

test/scenarios/releases/el98@rpm-standard1.sh.disabled

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ export TEST_RANDOMIZATION=none
1515

1616
configure_rhocp_repo() {
1717
local -r rhocp=$1
18-
local -r version=$2
18+
local -r major=$2
19+
local -r minor=$3
1920

2021
# The repository may be empty if the beta mirror is not up yet
2122
if [[ -z "${rhocp}" ]] ; then
2223
return
2324
fi
2425

25-
if [[ "${rhocp}" =~ ^[0-9]{2} ]]; then
26-
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
26+
if [[ "${rhocp}" =~ ^[0-9]{1,2}$ ]]; then
27+
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-${major}.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
2728
elif [[ "${rhocp}" =~ ^http ]]; then
28-
local -r ocp_repo_name="rhocp-4.${version}-for-rhel-9-mirrorbeta-rpms"
29+
local -r ocp_repo_name="rhocp-${major}.${minor}-for-rhel-9-mirrorbeta-rpms"
2930
local -r tmp_file=$(mktemp)
3031

3132
tee "${tmp_file}" >/dev/null <<EOF
@@ -70,8 +71,8 @@ scenario_run_tests() {
7071
# Note that rhocp or beta dependencies repository may not yet exist
7172
# for the current version. Then, just use whatever we can get for
7273
# the previous minor version.
73-
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MINOR_VERSION}"
74-
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MINOR_VERSION}"
74+
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MAJOR_VERSION}" "${MINOR_VERSION}"
75+
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MAJOR_VERSION}" "${MINOR_VERSION}"
7576
run_command_on_vm host1 "sudo subscription-manager repos --enable fast-datapath-for-rhel-9-\$(uname -m)-rpms"
7677

7778
run_tests host1 \

test/scenarios/releases/el98@rpm-standard2.sh.disabled

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ export TEST_RANDOMIZATION=none
1515

1616
configure_rhocp_repo() {
1717
local -r rhocp=$1
18-
local -r version=$2
18+
local -r major=$2
19+
local -r minor=$3
1920

2021
# The repository may be empty if the beta mirror is not up yet
2122
if [[ -z "${rhocp}" ]] ; then
2223
return
2324
fi
2425

25-
if [[ "${rhocp}" =~ ^[0-9]{2} ]]; then
26-
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
26+
if [[ "${rhocp}" =~ ^[0-9]{1,2}$ ]]; then
27+
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-${major}.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
2728
elif [[ "${rhocp}" =~ ^http ]]; then
28-
local -r ocp_repo_name="rhocp-4.${version}-for-rhel-9-mirrorbeta-rpms"
29+
local -r ocp_repo_name="rhocp-${major}.${minor}-for-rhel-9-mirrorbeta-rpms"
2930
local -r tmp_file=$(mktemp)
3031

3132
tee "${tmp_file}" >/dev/null <<EOF
@@ -71,8 +72,8 @@ scenario_run_tests() {
7172
# Note that rhocp or beta dependencies repository may not yet exist
7273
# for the current version. Then, just use whatever we can get for
7374
# the previous minor version.
74-
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MINOR_VERSION}"
75-
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MINOR_VERSION}"
75+
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MAJOR_VERSION}" "${MINOR_VERSION}"
76+
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MAJOR_VERSION}" "${MINOR_VERSION}"
7677
run_command_on_vm host1 "sudo subscription-manager repos --enable fast-datapath-for-rhel-9-\$(uname -m)-rpms"
7778

7879
run_tests host1 \

test/scenarios/releases/el98@rpm-upgrade.sh.disabled

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,18 @@ EOF
4343

4444
configure_rhocp_repo() {
4545
local -r rhocp=$1
46-
local -r version=$2
46+
local -r major=$2
47+
local -r minor=$3
4748

4849
# The repository may be empty if the beta mirror is not up yet
4950
if [[ -z "${rhocp}" ]] ; then
5051
return
5152
fi
5253

53-
if [[ "${rhocp}" =~ ^[0-9]{2} ]]; then
54-
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
54+
if [[ "${rhocp}" =~ ^[0-9]{1,2}$ ]]; then
55+
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-${major}.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
5556
elif [[ "${rhocp}" =~ ^http ]]; then
56-
local -r ocp_repo_name="rhocp-4.${version}-for-rhel-9-mirrorbeta-rpms"
57+
local -r ocp_repo_name="rhocp-${major}.${minor}-for-rhel-9-mirrorbeta-rpms"
5758
local -r tmp_file=$(mktemp)
5859

5960
tee "${tmp_file}" >/dev/null <<EOF
@@ -99,10 +100,10 @@ scenario_run_tests() {
99100
# Note that rhocp or beta dependencies repository may not yet exist
100101
# for the current version. Then, just use whatever we can get for
101102
# the previous minor version.
102-
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MINOR_VERSION}"
103-
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MINOR_VERSION}"
104-
configure_rhocp_repo "${RHOCP_MINOR_Y1}" "${PREVIOUS_MINOR_VERSION}"
105-
configure_rhocp_repo "${RHOCP_MINOR_Y1_BETA}" "${PREVIOUS_MINOR_VERSION}"
103+
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MAJOR_VERSION}" "${MINOR_VERSION}"
104+
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MAJOR_VERSION}" "${MINOR_VERSION}"
105+
configure_rhocp_repo "${RHOCP_MINOR_Y1}" "${PREVIOUS_MAJOR_VERSION}" "${PREVIOUS_MINOR_VERSION}"
106+
configure_rhocp_repo "${RHOCP_MINOR_Y1_BETA}" "${PREVIOUS_MAJOR_VERSION}" "${PREVIOUS_MINOR_VERSION}"
106107
configure_microshift_mirror "${PREVIOUS_RELEASE_REPO}"
107108
run_command_on_vm host1 "sudo subscription-manager repos --enable fast-datapath-for-rhel-9-\$(uname -m)-rpms"
108109

0 commit comments

Comments
 (0)