Skip to content

Commit

Permalink
Clear security cache between tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisknoll committed Apr 17, 2024
1 parent 9326c97 commit d6e9cbc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/java/org/ohdsi/webapi/security/PermissionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public void setup() {

@Test
public void permsTest() throws Exception {
// need to clear authorization cache before each test
permissionManager.clearAuthorizationInfoCache();
Subject s = SecurityUtils.getSubject();
String subjetName = permissionManager.getSubjectName();

Expand All @@ -86,11 +88,10 @@ public void permsTest() throws Exception {

@Test
public void wildcardTest() throws Exception {
// need to clear authorization cache before each test
permissionManager.clearAuthorizationInfoCache();
Subject s = SecurityUtils.getSubject();
String subjetName = permissionManager.getSubjectName();

final String[] testDataSetsPaths = new String[] {"/permission/wildcardTest_PREP.json" };

loadPrepData(testDataSetsPaths, DatabaseOperation.REFRESH);

// subject has * permisison, so any permisison test is true
Expand Down

0 comments on commit d6e9cbc

Please sign in to comment.