adde testConnectWithLog to SSH test
This commit is contained in:
parent
74b274771d
commit
15457dfb34
@ -19,6 +19,7 @@ package dorkbox.executor
|
|||||||
|
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
import org.slf4j.LoggerFactory
|
||||||
|
|
||||||
class ProcessSshTest {
|
class ProcessSshTest {
|
||||||
@Test
|
@Test
|
||||||
@ -39,4 +40,24 @@ class ProcessSshTest {
|
|||||||
|
|
||||||
println(process.output.utf8())
|
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())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user