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:
David Pursehouse
2016-04-22 17:58:23 +09:00
parent 01f8e903a5
commit 3e6785f74e

View File

@@ -516,7 +516,7 @@ public abstract class AbstractDaemonTest {
}
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()));
}