[Git][java-team/ca-certificates-java][master] * debian/tests: Don't hardcode JREs and JDKs. Closes: #1057696.

Matthias Klose (@doko) gitlab at salsa.debian.org
Thu Jan 18 10:09:19 GMT 2024



Matthias Klose pushed to branch master at Debian Java Maintainers / ca-certificates-java


Commits:
24c31c25 by Matthias Klose at 2024-01-18T11:09:06+01:00
  * debian/tests: Don't hardcode JREs and JDKs. Closes: #1057696.

- - - - -


4 changed files:

- debian/changelog
- debian/tests/can-convert-keystore
- debian/tests/can-install-jre
- debian/tests/can-install-multiple-jdks


Changes:

=====================================
debian/changelog
=====================================
@@ -6,7 +6,8 @@ ca-certificates-java (20240118) UNRELEASED; urgency=medium
     Java. Closes: #1057495.
 
   [ Matthias Klose ]
-  * Builld-depend on java-common.
+  * Build-depend on java-common.
+  * debian/tests: Don't hardcode JREs and JDKs. Closes: #1057696.
 
  -- Matthias Klose <doko at debian.org>  Thu, 18 Jan 2024 10:40:28 +0100
 


=====================================
debian/tests/can-convert-keystore
=====================================
@@ -17,7 +17,7 @@ touch /var/lib/ca-certificates-java/convert_pkcs12_keystore_to_jks
 
 # THEN conversion is successful
 output=`mktemp`
-apt-get install -y openjdk-8-jre-headless | tee ${output}
+apt-get install -y default-jre-headless | tee ${output}
 
 if [[ $(grep -L "Entry for alias amazon successfully imported." ${output}) ]];
 then


=====================================
debian/tests/can-install-jre
=====================================
@@ -2,7 +2,7 @@
 
 set -e
 
-versions=$(apt-cache search jre-headless | awk '{print $1}')
+versions=$(apt-cache -n search jre-headless | awk '{print $1}')
 for version in ${versions}
 do
 # WHEN openjdk-jre-headless package is installed from scratch


=====================================
debian/tests/can-install-multiple-jdks
=====================================
@@ -3,8 +3,12 @@
 set -e
 
 output=`mktemp`
+
+jdks=$(apt-cache -n search java-sdk| awk '$1 ~ /-.*-jdk$/ {print $1}')
+
 # WHEN multiple JDKs are installed
-apt-get install -y openjdk-11-jdk openjdk-17-jdk openjdk-8-jdk | tee ${output}
+echo "Installing $jdks ..."
+apt-get install -y $jdks | tee ${output}
 
 # THEN installation is successful
 if [[ $(grep -L "Adding debian:Amazon_Root_CA_1.pem" ${output}) ]]; then



View it on GitLab: https://salsa.debian.org/java-team/ca-certificates-java/-/commit/24c31c25b9a1340c145bc9988e4d498a02fa7704

-- 
View it on GitLab: https://salsa.debian.org/java-team/ca-certificates-java/-/commit/24c31c25b9a1340c145bc9988e4d498a02fa7704
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20240118/c4b121ae/attachment.htm>


More information about the pkg-java-commits mailing list