Skip to content

Commit

Permalink
Show sshd logs when integration test finishes.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirlagunov committed Jul 20, 2021
1 parent ca980ff commit 1f1b732
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,15 @@ task startItestContainer(type: DockerStartContainer) {
targetContainerId createItestContainer.getContainerId()
}

task logItestContainer(type: DockerLogsContainer) {
dependsOn createItestContainer
targetContainerId createItestContainer.getContainerId()
showTimestamps = true
stdErr = true
stdOut = true
tailAll = true
}

task stopItestContainer(type: DockerStopContainer) {
targetContainerId createItestContainer.getContainerId()
}
Expand All @@ -287,6 +296,7 @@ task forkedUploadRelease(type: GradleBuild) {

project.tasks.integrationTest.dependsOn(startItestContainer)
project.tasks.integrationTest.finalizedBy(stopItestContainer)
project.tasks.stopItestContainer.dependsOn(logItestContainer)

project.tasks.release.dependsOn([project.tasks.integrationTest, project.tasks.build])
project.tasks.release.finalizedBy(project.tasks.forkedUploadRelease)
Expand Down
4 changes: 3 additions & 1 deletion src/itest/docker-image/test-container/sshd_config
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,6 @@ HostKey /etc/ssh/ssh_host_ed25519_384_key
HostCertificate /etc/ssh/ssh_host_ed25519_384_key-cert.pub

HostKey /etc/ssh/ssh_host_rsa_2048_key
HostCertificate /etc/ssh/ssh_host_rsa_2048_key-cert.pub
HostCertificate /etc/ssh/ssh_host_rsa_2048_key-cert.pub

LogLevel DEBUG2

0 comments on commit 1f1b732

Please sign in to comment.