adde testConnectWithLog to SSH test

This commit is contained in:
Robinson 2021-03-20 20:10:17 +01:00
parent 74b274771d
commit 15457dfb34
1 changed files with 21 additions and 0 deletions

View File

@ -19,6 +19,7 @@ package dorkbox.executor
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.slf4j.LoggerFactory
class ProcessSshTest {
@Test
@ -39,4 +40,24 @@ class ProcessSshTest {
println(process.output.utf8())
}
@Test
fun testConnectWithLog() {
val process = runBlocking {
// NOTE: DO NOT SAVE LEGIT CREDENTIALS IN THIS FILE!
Executor()
.setLogger(LoggerFactory.getLogger(ProcessSshTest::class.java))
.enableRead()
.asSshProcess()
.disableStrictHostChecking()
.host("1.2.3.4")
.userName("user")
.password("12345!")
.port(123)
.command("ls")
.start()
}
println(process.output.utf8())
}
}