Skip to content

Commit 88fbe0d

Browse files
committed
fixed getting JWT from secrets
1 parent a2a6a0a commit 88fbe0d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,17 @@ jobs:
247247
EOF
248248
- name: Install Java client
249249
run: mvn --also-make --batch-mode --no-transfer-progress -DskipTests install
250-
- name: Generate JWT
251-
env:
252-
JWT_K_PEM: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_JWT_PRIVATE_KEY }}
253-
run: |
254-
npm install jsonwebtoken &&
255-
echo "CLIENT_JWT=$(node jwt-gen.js)" >> "$GITHUB_ENV"
250+
# - name: Generate JWT
251+
# env:
252+
# JWT_K_PEM: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_JWT_PRIVATE_KEY }}
253+
# run: |
254+
# npm install jsonwebtoken &&
255+
# echo "CLIENT_JWT=$(node jwt-gen.js)" >> "$GITHUB_ENV"
256256
- name: Test http client
257257
env:
258258
CLICKHOUSE_CLOUD_HOST: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_HOST_SMT }}
259259
CLICKHOUSE_CLOUD_PASSWORD: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_PASSWORD_SMT }}
260+
CLIENT_JWT: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_JWT_DESERT_VM_43 }}
260261
run: |
261262
mvn --batch-mode --no-transfer-progress --projects ${{ matrix.project }} -DclickhouseVersion=${{ matrix.clickhouse }} -Dprotocol=http verify
262263
- name: Upload test results

client-v2/src/test/java/com/clickhouse/client/HttpTransportTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ public void testJWTWithCloud() throws Exception {
10141014
if (!isCloud()) {
10151015
return; // only for cloud
10161016
}
1017-
String jwt = System.getenv("INTEGRATIONS_TEAM_TESTS_CLOUD_JWT_DESERT_VM_43");
1017+
String jwt = System.getenv("CLIENT_JWT");
10181018
Assert.assertTrue(jwt != null && !jwt.trim().isEmpty(), "JWT is missing");
10191019
Assert.assertFalse(jwt.contains("\n") || jwt.contains("-----"), "JWT should be single string ready for HTTP header");
10201020
try (Client client = newClient().useBearerTokenAuth(jwt).build()) {

0 commit comments

Comments
 (0)