Package org.eclipse.jgit.junit.ssh
Class SshTestBase
- java.lang.Object
-
public abstract class SshTestBase extends SshBasicTestBase
The ssh tests. Concrete subclasses can re-use these tests by implementing the abstract operations fromSshTestHarness
. This gives a way to test different ssh clients against a unified test suite.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.junit.ssh.SshTestHarness
SshTestHarness.LogEntry, SshTestHarness.TestCredentialsProvider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
KEY_RESOURCES
-
Fields inherited from class org.eclipse.jgit.junit.ssh.SshBasicTestBase
defaultCloneDir
-
Fields inherited from class org.eclipse.jgit.junit.ssh.SshTestHarness
knownHosts, privateKey1, privateKey2, publicKey1, publicKey2, server, sshDir, TEST_USER, testPort
-
Fields inherited from class org.eclipse.jgit.junit.RepositoryTestCase
db, trash
-
Fields inherited from class org.eclipse.jgit.junit.LocalDiskRepositoryTestCase
ASSUME_UNCHANGED, author, committer, CONTENT, CONTENT_ID, LENGTH, mockSystemReader, MOD_TIME, SMUDGE
-
-
Constructor Summary
Constructors Constructor Description SshTestBase()
-
Method Summary
-
Methods inherited from class org.eclipse.jgit.junit.ssh.SshBasicTestBase
setUp, testSshCloneWithConfig, testSshFetchWithConfig
-
Methods inherited from class org.eclipse.jgit.junit.ssh.SshTestHarness
cloneWith, copyTestResource, copyTestResource, createKnownHostsFile, createSessionFactory, getSessionFactory, hasHostKey, installConfig, pushTo, pushTo, shutdownServer
-
Methods inherited from class org.eclipse.jgit.junit.RepositoryTestCase
assertEqualsFile, check, checkFile, checkoutBranch, commitFile, copyFile, createBranch, createEntry, createEntry, createEntry, createGitLink, deleteTrashFile, fsTick, indexState, lookup, read, resetIndex, slashify, tearDown, writeLink, writeTrashFile, writeTrashFile, writeTrashFiles
-
Methods inherited from class org.eclipse.jgit.junit.LocalDiskRepositoryTestCase
addRepoToClose, createBareRepository, createRepository, createRepository, createTempDirectory, createTempFile, createUniqueTestGitDir, createWorkRepository, getCeilings, getTemporaryDirectory, indexState, read, recursiveDelete, runHook, tick, write, write
-
-
-
-
Method Detail
-
testSshWithoutConfig
public void testSshWithoutConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSingleCommand
public void testSingleCommand() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSingleCommandWithTimeoutExpired
public void testSingleCommandWithTimeoutExpired() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithGlobalIdentity
public void testSshWithGlobalIdentity() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithDefaultIdentity
public void testSshWithDefaultIdentity() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithConfigEncryptedUnusedKey
public void testSshWithConfigEncryptedUnusedKey() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithConfigEncryptedUnusedKeyInConfigLast
public void testSshWithConfigEncryptedUnusedKeyInConfigLast() throws java.lang.Exception
- Throws:
java.lang.Exception
-
isJsch
private boolean isJsch()
-
testSshWithConfigEncryptedUnusedKeyInConfigFirst
public void testSshWithConfigEncryptedUnusedKeyInConfigFirst() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshEncryptedUsedKeyCached
public void testSshEncryptedUsedKeyCached() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshEncryptedUsedKeyWrongPassword
public void testSshEncryptedUsedKeyWrongPassword() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshEncryptedUsedKeySeveralPassword
public void testSshEncryptedUsedKeySeveralPassword() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithoutKnownHosts
public void testSshWithoutKnownHosts() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithoutKnownHostsWithProviderAsk
public void testSshWithoutKnownHostsWithProviderAsk() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithoutKnownHostsWithProviderAcceptNew
public void testSshWithoutKnownHostsWithProviderAcceptNew() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithoutKnownHostsDeny
public void testSshWithoutKnownHostsDeny() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshModifiedHostKeyDeny
public void testSshModifiedHostKeyDeny() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshModifiedHostKeyWithProviderDeny
public void testSshModifiedHostKeyWithProviderDeny() throws java.lang.Exception
- Throws:
java.lang.Exception
-
checkKnownHostsModifiedHostKey
private void checkKnownHostsModifiedHostKey(java.io.File backup, java.io.File newFile, java.lang.String wrongKey) throws java.io.IOException
- Throws:
java.io.IOException
-
testSshModifiedHostKeyAllow
public void testSshModifiedHostKeyAllow() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshModifiedHostKeyAsk
public void testSshModifiedHostKeyAsk() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshCloneWithConfigAndPush
public void testSshCloneWithConfigAndPush() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSftpWithConfig
public void testSftpWithConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSftpCloneWithConfigAndPush
public void testSftpCloneWithConfigAndPush() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithConfigWrongKey
public void testSshWithConfigWrongKey() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithWrongUserNameInConfig
public void testSshWithWrongUserNameInConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithWrongPortInConfig
public void testSshWithWrongPortInConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithAliasInConfig
public void testSshWithAliasInConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithUnknownCiphersInConfig
public void testSshWithUnknownCiphersInConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithUnknownHostKeyAlgorithmsInConfig
public void testSshWithUnknownHostKeyAlgorithmsInConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithUnknownKexAlgorithmsInConfig
public void testSshWithUnknownKexAlgorithmsInConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithMinimalHostKeyAlgorithmsInConfig
public void testSshWithMinimalHostKeyAlgorithmsInConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithUnknownAuthInConfig
public void testSshWithUnknownAuthInConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshWithNoMatchingAuthInConfig
public void testSshWithNoMatchingAuthInConfig() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testRsaHostKeySecond
public void testRsaHostKeySecond() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testEcDsaHostKey
public void testEcDsaHostKey() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testPasswordAuth
public void testPasswordAuth() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testPasswordAuthSeveralTimes
public void testPasswordAuthSeveralTimes() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testPasswordAuthWrongPassword
public void testPasswordAuthWrongPassword() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testPasswordAuthNoPassword
public void testPasswordAuthNoPassword() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testPasswordAuthCorrectPasswordTooLate
public void testPasswordAuthCorrectPasswordTooLate() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testKeyboardInteractiveAuth
public void testKeyboardInteractiveAuth() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testKeyboardInteractiveAuthSeveralTimes
public void testKeyboardInteractiveAuthSeveralTimes() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testKeyboardInteractiveAuthWrongPassword
public void testKeyboardInteractiveAuthWrongPassword() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testKeyboardInteractiveAuthNoPassword
public void testKeyboardInteractiveAuthNoPassword() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testKeyboardInteractiveAuthCorrectPasswordTooLate
public void testKeyboardInteractiveAuthCorrectPasswordTooLate() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSshKeys
public void testSshKeys(java.lang.String keyName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-