Skip to content

Commit 4f5d5bd

Browse files
author
Vladimir Kotal
committed
add test with 2 OPTIONAL plugins
1 parent 792e537 commit 4f5d5bd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/authorization/AuthorizationFrameworkTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,21 @@ public static StackSetup[][] params() {
705705
NewTest(true, createAllowedProject()),
706706
NewTest(true, createAllowedGroup()))
707707
},
708+
{
709+
new StackSetup(
710+
NewStack(AuthControlFlag.REQUIRED,
711+
new AuthorizationPlugin(AuthControlFlag.OPTIONAL, createAllowedPrefixPlugin()),
712+
new AuthorizationPlugin(AuthControlFlag.OPTIONAL, createNotAllowedPrefixPlugin())
713+
),
714+
// optional plugin1 returns false
715+
// optional plugin2 returns true => true
716+
NewTest(true, createUnallowedProject()),
717+
NewTest(true, createUnallowedGroup()),
718+
// optional plugin1 returns true
719+
// optional plugin2 returns false
720+
NewTest(true, createAllowedProject()),
721+
NewTest(true, createAllowedGroup()))
722+
},
708723
};
709724
}
710725

0 commit comments

Comments
 (0)