-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
13 additions
and
2 deletions.
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
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
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ import org.thp.thehive.services.OrganisationOps._ | |
import org.thp.thehive.services.UserOps._ | ||
import play.api.test.PlaySpecification | ||
|
||
import scala.concurrent.duration.DurationInt | ||
import scala.util.{Failure, Success} | ||
|
||
class UserSrvTest extends PlaySpecification with TestAppBuilder { | ||
|
@@ -73,7 +74,7 @@ class UserSrvTest extends PlaySpecification with TestAppBuilder { | |
if (userCount == 2) Success(()) | ||
else Failure(new Exception(s"User certadmin is not in cert organisation twice ($userCount)")) | ||
} | ||
new UserIntegrityCheck(db, userSrv, profileSrv, organisationSrv, roleSrv).dedup(KillSwitch.alwaysOn) | ||
new UserIntegrityCheck(db, userSrv, profileSrv, organisationSrv, roleSrv).runGlobalCheck(5.minutes, KillSwitch.alwaysOn) | ||
db.roTransaction { implicit graph => | ||
val userCount = userSrv.get(EntityName("[email protected]")).organisations.get(EntityName("cert")).getCount | ||
userCount must beEqualTo(1) | ||
|