Merge "Move getIdent from the SshSession to the TestAccount class"
This commit is contained in:
@@ -23,8 +23,6 @@ import com.jcraft.jsch.JSch;
|
||||
import com.jcraft.jsch.JSchException;
|
||||
import com.jcraft.jsch.Session;
|
||||
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
|
||||
public class SshSession {
|
||||
|
||||
private final TestAccount account;
|
||||
@@ -78,8 +76,4 @@ public class SshSession {
|
||||
b.append(session.getPort());
|
||||
return b.toString();
|
||||
}
|
||||
|
||||
public PersonIdent getIdent() {
|
||||
return new PersonIdent(session.getUserName(), account.email);
|
||||
}
|
||||
}
|
||||
|
@@ -20,6 +20,8 @@ import java.io.ByteArrayOutputStream;
|
||||
|
||||
import com.jcraft.jsch.KeyPair;
|
||||
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
|
||||
|
||||
public class TestAccount {
|
||||
public final Account.Id id;
|
||||
@@ -44,4 +46,8 @@ public class TestAccount {
|
||||
sshKey.writePrivateKey(out);
|
||||
return out.toByteArray();
|
||||
}
|
||||
|
||||
public PersonIdent getIdent() {
|
||||
return new PersonIdent(username, email);
|
||||
}
|
||||
}
|
||||
|
@@ -269,7 +269,7 @@ public class PushForReviewIT extends AbstractDaemonTest {
|
||||
|
||||
public PushResult to(String ref) throws GitAPIException, IOException {
|
||||
add(git, FILE_NAME, FILE_CONTENT);
|
||||
changeId = createCommit(git, sshSession.getIdent(), SUBJECT);
|
||||
changeId = createCommit(git, admin.getIdent(), SUBJECT);
|
||||
return pushHead(git, ref);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user