AbstractDaemonTest#newRequestContext: Use correct user for SSH session
The method takes a TestAccount argument, but always passes 'admin' as the account when creating the SSH session. Thus, when creating a request context with an account other than 'admin', the context's getSession() method still returns an SSH session for the 'admin' user. Change-Id: I21ad16553752292416165ed1fcae7c03fd7d21f3
This commit is contained in:
@@ -516,7 +516,7 @@ public abstract class AbstractDaemonTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Context newRequestContext(TestAccount account) {
|
private Context newRequestContext(TestAccount account) {
|
||||||
return atrScope.newContext(reviewDbProvider, new SshSession(server, admin),
|
return atrScope.newContext(reviewDbProvider, new SshSession(server, account),
|
||||||
identifiedUserFactory.create(Providers.of(db), account.getId()));
|
identifiedUserFactory.create(Providers.of(db), account.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user