Skip to content

Commit b130e75

Browse files
authored
Merge pull request #35923 from siyuanfoundation/compat-node
[compatibility] change skip version test to use old node tests
2 parents d67c50e + 25215fd commit b130e75

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

experiment/compatibility-versions/e2e-skip-version-testing.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ trap signal_handler INT TERM
3434

3535
run_skip_version_tests() {
3636
export PARALLEL=true
37+
initial_emulated_version="$EMULATED_VERSION"
3738
ret=0
3839
while ! version_gte "$EMULATED_VERSION" "$CURRENT_VERSION"; do
3940
echo "Running e2e with compatibility version set to ${EMULATED_VERSION}"
@@ -49,6 +50,11 @@ run_skip_version_tests() {
4950
return 1
5051
fi
5152
pushd "${PREV_RELEASE_REPO_PATH}"
53+
if [[ "$EMULATED_VERSION" != "$initial_emulated_version" ]]; then
54+
# overwrite node e2e tests with the node tests at the initial emulated version because Kubelet is still at that version.
55+
echo "Replace ${EMULATED_VERSION} node tests with node tests at ${initial_emulated_version}"
56+
rsync -av --delete "./test/e2e/node" "${TMP_DIR}/prev-release-k8s-${initial_emulated_version}/test/e2e/node"
57+
fi
5258
build_test_bins "${PREV_RELEASE_BRANCH}" || ret=$?
5359
run_e2e_tests || ret=$?
5460
if [[ "$ret" -ne 0 ]]; then
@@ -66,6 +72,11 @@ run_skip_version_tests() {
6672
# Test removal of emulated version entirely.
6773
export PREV_RELEASE_BRANCH="release-${EMULATED_VERSION}"
6874
delete_emulation_version || ret=$?
75+
if [[ "$EMULATED_VERSION" != "$initial_emulated_version" ]]; then
76+
# overwrite node e2e tests with the node tests at the initial emulated version because Kubelet is still at that version.
77+
echo "Replace ${EMULATED_VERSION} node tests with node tests at ${initial_emulated_version}"
78+
rsync -av --delete "./test/e2e/node" "${TMP_DIR}/prev-release-k8s-${initial_emulated_version}/test/e2e/node"
79+
fi
6980
build_test_bins "${PREV_RELEASE_BRANCH}" || ret=$?
7081
run_e2e_tests || ret=$?
7182
return $ret

0 commit comments

Comments
 (0)