Skip to content

Commit

Permalink
added assertions for JWT token
Browse files Browse the repository at this point in the history
  • Loading branch information
chernser committed Jan 14, 2025
1 parent b4596fc commit a2a6a0a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@

import static com.github.tomakehurst.wiremock.stubbing.Scenario.STARTED;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.fail;

Expand Down Expand Up @@ -1014,6 +1015,8 @@ public void testJWTWithCloud() throws Exception {
return; // only for cloud
}
String jwt = System.getenv("INTEGRATIONS_TEAM_TESTS_CLOUD_JWT_DESERT_VM_43");
Assert.assertTrue(jwt != null && !jwt.trim().isEmpty(), "JWT is missing");
Assert.assertFalse(jwt.contains("\n") || jwt.contains("-----"), "JWT should be single string ready for HTTP header");
try (Client client = newClient().useBearerTokenAuth(jwt).build()) {
try {
List<GenericRecord> response = client.queryAll("SELECT user(), now()");
Expand Down

0 comments on commit a2a6a0a

Please sign in to comment.