Skip to content

Commit b69abf6

Browse files
committed
Grant assistant access in cross-service test
1 parent 95742a6 commit b69abf6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

services/system-tests/src/test/kotlin/com/jorisjonkers/personalstack/systemtests/CrossServiceSystemTest.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ class CrossServiceSystemTest {
2020
private val assistantBaseUrl = TestHelper.assistantBaseUrl
2121

2222
private fun registerAndAuthenticate(): AuthenticatedSession {
23-
val session = TestHelper.registerConfirmAndGetSession()
23+
val username = "cross_${java.util.UUID.randomUUID().toString().take(8)}"
24+
val user = TestHelper.registerAndConfirm(username)
25+
TestHelper.grantServicePermission(username, "ASSISTANT")
26+
val session = TestHelper.sessionLogin(user)
2427
val userId = verifyAndGetUserId(session.sessionCookie)
2528
return AuthenticatedSession(session.sessionCookie, userId)
2629
}

0 commit comments

Comments
 (0)