-
Notifications
You must be signed in to change notification settings - Fork 148
/
test_build_all_images.sh
executable file
·40 lines (33 loc) · 1.17 KB
/
test_build_all_images.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
source build_all_images.sh --test
source _test_common.sh
function main {
test_get_latest_available_zulu_version
}
function test_get_latest_available_zulu_version {
_test_get_latest_available_zulu_version "8" "amd64"
_test_get_latest_available_zulu_version "8" "arm64"
_test_get_latest_available_zulu_version "11" "amd64"
_test_get_latest_available_zulu_version "11" "arm64"
_test_get_latest_available_zulu_version "21" "amd64"
_test_get_latest_available_zulu_version "21" "arm64"
}
function _test_get_latest_available_zulu_version {
echo -e "Running _test_get_latest_available_zulu_version for JDK ${1} ${2}.\n"
local latest_available_zulu_version=$(get_latest_available_zulu_version "${1}" "${2}")
if [ "${1}" == "21" ]
then
assert_equals "${latest_available_zulu_version}" "21.30.15"
else
assert_equals \
"${latest_available_zulu_version}" \
$(curl \
--header 'accept: */*' \
--location \
--silent \
"https://api.azul.com/zulu/download/community/v1.0/bundles/latest/?arch=${2}&bundle_type=jdk&ext=deb&hw_bitness=64&javafx=false&java_version=${1}&os=linux" | \
jq -r '.zulu_version | join(".")' | \
cut -d '.' -f 1,2,3)
fi
}
main