File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
client-v2/src/test/java/com/clickhouse/client Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 6060
6161import static com .github .tomakehurst .wiremock .stubbing .Scenario .STARTED ;
6262import static org .junit .Assert .assertEquals ;
63+ import static org .junit .Assert .assertNotNull ;
6364import static org .junit .Assert .assertThrows ;
6465import static org .junit .Assert .fail ;
6566
@@ -1016,6 +1017,8 @@ public void testJWTWithCloud() throws Exception {
10161017 return ; // only for cloud
10171018 }
10181019 String jwt = System .getenv ("CLIENT_JWT" );
1020+ Assert .assertTrue (jwt != null && !jwt .trim ().isEmpty (), "JWT is missing" );
1021+ Assert .assertFalse (jwt .contains ("\n " ) || jwt .contains ("-----" ), "JWT should be single string ready for HTTP header" );
10191022 try (Client client = newClient ().useBearerTokenAuth (jwt ).build ()) {
10201023 try {
10211024 List <GenericRecord > response = client .queryAll ("SELECT user(), now()" );
You can’t perform that action at this time.
0 commit comments