Skip to content

Commit 98b9687

Browse files
committed
Fix tests relying on default JDK version
1 parent 11f2cfb commit 98b9687

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

test/docker_clojure/docker_test.clj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@
3535
(deftest all-tags-test
3636
(testing "Generates all-defaults tag for a build tool"
3737
(let [tags (all-tags {:base-image "debian"
38-
:jdk-version 21
38+
:jdk-version cfg/default-jdk-version
3939
:distro :debian/bookworm
4040
:build-tool "tools-deps"
4141
:build-tool-version "1.11.1.1155"})]
42-
(is ((set tags) "tools-deps"))))
42+
(is ((set tags) "tools-deps")
43+
(str "Expected \"tools-deps\" to be in " (pr-str tags)))))
4344
(testing "Generates jdk-version-build-tool tag for every jdk version"
4445
(are [jdk-version tag]
4546
(let [tags (all-tags {:base-image (if (< jdk-version 21)
@@ -55,10 +56,10 @@
5556
11 "temurin-11-tools-deps"
5657
17 "temurin-17-tools-deps"
5758
21 "temurin-21-tools-deps"))
58-
(testing "Generates build-tool-distro tag for every distro"
59+
(testing "Generates build-tool-distro tag for every distro with default JDK version"
5960
(are [distro tag]
6061
(let [tags (all-tags {:base-image "debian"
61-
:jdk-version 21
62+
:jdk-version cfg/default-jdk-version
6263
:distro distro
6364
:build-tool "tools-deps"
6465
:build-tool-version "1.11.1.1155"})]

0 commit comments

Comments
 (0)