-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter values for teams without team prefix
Signed-off-by: stianst <stianst@gmail.com>
- Loading branch information
Showing
3 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/test/java/org/keycloak/gh/bot/representations/TeamsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.keycloak.gh.bot.representations; | ||
|
||
import org.junit.jupiter.api.*; | ||
|
||
import java.io.IOException; | ||
|
||
public class TeamsTest { | ||
|
||
@BeforeEach | ||
@AfterEach | ||
public void resetTeams() { | ||
Teams.clearInstance(); | ||
} | ||
|
||
@Test | ||
public void testRemote() throws IOException { | ||
Teams teams = Teams.getTeams(); | ||
Assertions.assertFalse(teams.isEmpty()); | ||
Assertions.assertFalse(teams.values().iterator().next().isEmpty()); | ||
} | ||
|
||
@Test | ||
public void testNotPrefixedRemoved() throws IOException { | ||
Teams teams = Teams.getTeams(getClass().getResource("teams.yml")); | ||
Assertions.assertFalse(teams.isEmpty()); | ||
Assertions.assertFalse(teams.containsKey("no-team")); | ||
Assertions.assertTrue(teams.containsKey("team/core-shared")); | ||
} | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
src/test/resources/org/keycloak/gh/bot/representations/teams.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
team/cloud-native: | ||
- area/admin/cli | ||
- area/dist/quarkus | ||
- area/operator | ||
|
||
team/continuous-testing: | ||
- area/ci | ||
- area/testsuite | ||
|
||
team/core-clients: | ||
- area/adapter/fuse | ||
- area/adapter/java-cli | ||
- area/adapter/jee | ||
- area/adapter/jee-saml | ||
- area/adapter/spring | ||
- area/authentication | ||
- area/authentication/webauthn | ||
- area/login/ui | ||
- area/oidc | ||
- area/oid4vc | ||
- area/saml | ||
|
||
team/core-iam: | ||
- area/admin/fine-grained-permissions | ||
- area/authorization-services | ||
- area/identity-brokering | ||
- area/user-profile | ||
|
||
team/core-shared: | ||
- area/account/api | ||
- area/admin/api | ||
- area/admin/client-java | ||
- area/core | ||
- area/import-export | ||
- area/infinispan | ||
- area/ldap | ||
- area/storage | ||
- area/token-exchange | ||
|
||
team/ui: | ||
- area/account/ui | ||
- area/adapter/javascript | ||
- area/admin/client-js | ||
- area/admin/ui | ||
- area/welcome/ui | ||
|
||
team/community: | ||
- area/translations | ||
|
||
no-team: | ||
- area/docs | ||
- area/dependencies |