Skip to content

Commit f5db0a9

Browse files
committed
chore: update OIDC provider config for tests
1 parent d1eee36 commit f5db0a9

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

src/it/java/io/weaviate/containers/Weaviate.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,15 @@ public Builder enableAnonymousAccess(boolean enable) {
260260
return this;
261261
}
262262

263+
/** User default OIDC provider for integration tests. */
264+
public Builder withOIDC() {
265+
return withOIDC(
266+
"Peuc12y02UA0eAED1dqSjE5HtGUrpBsx",
267+
"https://auth.weaviate.cloud/Peuc12y02UA0eAED1dqSjE5HtGUrpBsx",
268+
"email", "roles");
269+
270+
}
271+
263272
public Builder withOIDC(String clientId, String issuer, String usernameClaim, String groupsClaim) {
264273
enableAnonymousAccess(false);
265274
environment.put("AUTHENTICATION_OIDC_ENABLED", "true");

src/it/java/io/weaviate/integration/OIDCSupportITest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ public class OIDCSupportITest extends ConcurrentTest {
3434
* Weaviate container that uses WCS-backed OIDC provider.
3535
* Supports ResourceOwnerPassword and RefreshToken authentication flows.
3636
*/
37-
private static final Weaviate wcsContainer = Weaviate.custom()
38-
.withOIDC("Peuc12y02UA0eAED1dqSjE5HtGUrpBsx", "https://auth.weaviate.cloud/Peuc12y02UA0eAED1dqSjE5HtGUrpBsx", "email", "roles")
39-
.build();
37+
private static final Weaviate wcsContainer = Weaviate.custom().withOIDC().build();
4038

4139
private static final String OKTA_CLIENT_ID = "0oa7e9ipdkVZRUcxo5d7";
4240
private static final String OKTA_CLIENT_SECRET = System.getenv("OKTA_CLIENT_SECRET");
@@ -76,8 +74,7 @@ public void test_bearerToken() throws Exception {
7674
pingWeaviateAsync(wcsContainer, auth);
7775
}
7876

79-
// TODO[g-despot] Fix test after release, descope has been deprecated
80-
// @Test
77+
@Test
8178
public void test_resourceOwnerPassword() throws Exception {
8279
Assume.assumeTrue("WCS_DUMMY_CI_PW is not set", WCS_DUMMY_CI_PW != null && !WCS_DUMMY_CI_PW.isBlank());
8380
Assume.assumeTrue("no internet connection", hasInternetConnection());

src/it/java/io/weaviate/integration/RbacITest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ public class RbacITest extends ConcurrentTest {
4949
.withAdminUsers(ADMIN_USER)
5050
.withApiKeys(API_KEY)
5151
.withRbac()
52-
.withOIDC( // Enable OIDC to have Weaviate return different user types (db, db_env, oidc)
53-
"wcs",
54-
"https://auth.wcs.api.weaviate.io/auth/realms/SeMI",
55-
"email",
56-
"groups")
52+
.withOIDC() // Enable OIDC to have Weaviate return different user types (db, db_env, oidc)
5753
.build();
5854

5955
private static final WeaviateClient client = container

0 commit comments

Comments
 (0)