mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Remove unused KUBE_TEST_API logic
This commit is contained in:
parent
3341611480
commit
2a47900620
@ -31,16 +31,6 @@ export KUBE_CACHE_MUTATION_DETECTOR
|
|||||||
KUBE_PANIC_WATCH_DECODE_ERROR="${KUBE_PANIC_WATCH_DECODE_ERROR:-true}"
|
KUBE_PANIC_WATCH_DECODE_ERROR="${KUBE_PANIC_WATCH_DECODE_ERROR:-true}"
|
||||||
export KUBE_PANIC_WATCH_DECODE_ERROR
|
export KUBE_PANIC_WATCH_DECODE_ERROR
|
||||||
|
|
||||||
# Handle case where OS has sha#sum commands, instead of shasum.
|
|
||||||
if which shasum >/dev/null 2>&1; then
|
|
||||||
SHA1SUM="shasum -a1"
|
|
||||||
elif which sha1sum >/dev/null 2>&1; then
|
|
||||||
SHA1SUM="sha1sum"
|
|
||||||
else
|
|
||||||
echo "Failed to find shasum or sha1sum utility." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
kube::test::find_dirs() {
|
kube::test::find_dirs() {
|
||||||
(
|
(
|
||||||
cd "${KUBE_ROOT}"
|
cd "${KUBE_ROOT}"
|
||||||
@ -182,14 +172,7 @@ junitFilenamePrefix() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
mkdir -p "${KUBE_JUNIT_REPORT_DIR}"
|
mkdir -p "${KUBE_JUNIT_REPORT_DIR}"
|
||||||
# This filename isn't parsed by anything, and we must avoid
|
echo "${KUBE_JUNIT_REPORT_DIR}/junit_$(kube::util::sortable_date)"
|
||||||
# exceeding 255 character filename limit. KUBE_TEST_API
|
|
||||||
# barely fits there and in coverage mode test names are
|
|
||||||
# appended to generated file names, easily exceeding
|
|
||||||
# 255 chars in length. So let's just use a sha1 hash of it.
|
|
||||||
local KUBE_TEST_API_HASH
|
|
||||||
KUBE_TEST_API_HASH="$(echo -n "${KUBE_TEST_API//\//-}"| ${SHA1SUM} |awk '{print $1}')"
|
|
||||||
echo "${KUBE_JUNIT_REPORT_DIR}/junit_${KUBE_TEST_API_HASH}_$(kube::util::sortable_date)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
verifyAndSuggestPackagePath() {
|
verifyAndSuggestPackagePath() {
|
||||||
@ -274,9 +257,8 @@ runTests() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Create coverage report directories.
|
# Create coverage report directories.
|
||||||
KUBE_TEST_API_HASH="$(echo -n "${KUBE_TEST_API//\//-}"| ${SHA1SUM} |awk '{print $1}')"
|
|
||||||
if [[ -z "${KUBE_COVER_REPORT_DIR}" ]]; then
|
if [[ -z "${KUBE_COVER_REPORT_DIR}" ]]; then
|
||||||
cover_report_dir="/tmp/k8s_coverage/${KUBE_TEST_API_HASH}/$(kube::util::sortable_date)"
|
cover_report_dir="/tmp/k8s_coverage/$(kube::util::sortable_date)"
|
||||||
else
|
else
|
||||||
cover_report_dir="${KUBE_COVER_REPORT_DIR}"
|
cover_report_dir="${KUBE_COVER_REPORT_DIR}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user