File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
plugins/LdapPlugin/test/opengrok/auth/plugin Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 17
17
* CDDL HEADER END
18
18
*/
19
19
20
- /*
20
+ /*
21
21
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
22
22
*/
23
23
package opengrok .auth .plugin ;
@@ -49,6 +49,7 @@ public class LdapAttrTest {
49
49
50
50
private HttpServletRequest dummyRequest ;
51
51
private LdapAttr plugin ;
52
+ private AuthorizationFramework framework ;
52
53
53
54
private static File whitelistFile ;
54
55
@@ -77,7 +78,8 @@ public void setUp() {
77
78
78
79
plugin .load (parameters );
79
80
80
- AuthorizationFramework .getInstance ().setPluginVersion (1 );
81
+ framework = new AuthorizationFramework (null );
82
+ framework .setPluginVersion (1 );
81
83
}
82
84
83
85
private void prepareRequest (String username , String mail , String ... ous ) {
@@ -152,7 +154,7 @@ public void testInvalidateSession() {
152
154
Assert .assertTrue (plugin .isAllowed (dummyRequest , makeGroup ("Group 1" )));
153
155
Assert .assertTrue (plugin .isAllowed (dummyRequest , makeGroup ("Group 2" )));
154
156
155
- AuthorizationFramework . getInstance () .increasePluginVersion ();
157
+ framework .increasePluginVersion ();
156
158
prepareRequest (
"007" ,
"[email protected] " ,
"MI6" ,
"MI7" );
157
159
158
160
Assert .assertTrue (plugin .isAllowed (dummyRequest , makeProject ("Random Project" )));
You can’t perform that action at this time.
0 commit comments