Quellcode durchsuchen

ZOOKEEPER-4859: Fix openssl gencerts failure due to too long hostname in github ci (#2186)

Reviewers: anmolnar
Author: kezhuw
Closes #2186 from kezhuw/ZOOKEEPER-4859
Kezhu Wang vor 10 Monaten
Ursprung
Commit
f13bd71490
2 geänderte Dateien mit 11 neuen und 1 gelöschten Zeilen
  1. 7 0
      .github/workflows/ci.yaml
  2. 4 1
      zookeeper-client/zookeeper-client-c/tests/zkServer.sh

+ 7 - 0
.github/workflows/ci.yaml

@@ -86,6 +86,13 @@ jobs:
         name: failsafe-reports-${{ matrix.profile.name }}
         path: ./**/target/failsafe-reports/
         if-no-files-found: ignore
+    - name: Upload cppunit test logs
+      if: ${{ failure() }}
+      uses: actions/upload-artifact@v3
+      with:
+        name: cppunit-logs-${{ matrix.profile.name }}
+        path: ./zookeeper-client/zookeeper-client-c/target/c/TEST-*.txt
+        if-no-files-found: ignore
   typo-check:
     name: Typo Check
     # only run on pull requests because of security reasons

+ 4 - 1
zookeeper-client/zookeeper-client-c/tests/zkServer.sh

@@ -183,7 +183,10 @@ start|startClean|startRequireSASLAuth|startCleanReadOnly)
     mkdir -p "${certs_dir}"
     cp ${tests_dir}/../ssl/gencerts.sh "${certs_dir}/"  > /dev/null
     cd ${certs_dir} > /dev/null
-    ./gencerts.sh > ./gencerts.stdout 2> ./gencerts.stderr
+    # GitHub is providing us hostnames with more than 64 characters now.
+    # And there are no cppunit tests do hostname verification currently,
+    # so we could set CN to arbitrary hostname for now.
+    ./gencerts.sh tests.zookeeper.apache.org > ./gencerts.stdout 2> ./gencerts.stderr
     cd - > /dev/null