exclude tests from ci
This commit is contained in:
parent
a377f7c9e1
commit
201f296514
1 changed files with 15 additions and 15 deletions
|
@ -6,26 +6,25 @@ import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.fileC
|
||||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
|
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
|
||||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||||
|
import org.domaindrivenarchitecture.provs.test.tags.NonCi
|
||||||
import org.junit.jupiter.api.Assertions.*
|
import org.junit.jupiter.api.Assertions.*
|
||||||
import org.junit.jupiter.api.Test
|
|
||||||
|
|
||||||
internal class WebKtTest {
|
internal class WebKtTest {
|
||||||
|
|
||||||
@ContainerTest
|
@ContainerTest
|
||||||
@Test
|
|
||||||
fun downloadFromURL_downloadsFile() {
|
fun downloadFromURL_downloadsFile() {
|
||||||
// given
|
// given
|
||||||
val a = defaultTestContainer()
|
val prov = defaultTestContainer()
|
||||||
val file = "file1"
|
val file = "file1"
|
||||||
a.createFile("/tmp/" + file, "hello")
|
prov.createFile("/tmp/" + file, "hello")
|
||||||
|
|
||||||
// when
|
// when
|
||||||
val res = a.downloadFromURL("file:///tmp/" + file, "file2", "/tmp")
|
val res = prov.downloadFromURL("file:///tmp/" + file, "file2", "/tmp")
|
||||||
val res2 = a.downloadFromURL("file:///tmp/" + file, "file2", "/tmp")
|
val res2 = prov.downloadFromURL("file:///tmp/" + file, "file2", "/tmp")
|
||||||
val res3 = a.downloadFromURL("file:///tmp/" + file, "file2", "/tmp", overwrite = true)
|
val res3 = prov.downloadFromURL("file:///tmp/" + file, "file2", "/tmp", overwrite = true)
|
||||||
|
|
||||||
// then
|
// then
|
||||||
val res4 = a.fileContent("/tmp/file2")
|
val res4 = prov.fileContent("/tmp/file2")
|
||||||
|
|
||||||
assertTrue(res.success)
|
assertTrue(res.success)
|
||||||
assertEquals("File /tmp/file2 already exists.", res2.out)
|
assertEquals("File /tmp/file2 already exists.", res2.out)
|
||||||
|
@ -35,26 +34,24 @@ internal class WebKtTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ContainerTest
|
@ContainerTest
|
||||||
@Test
|
|
||||||
fun downloadFromURL_local_file_with_correct_checksum() {
|
fun downloadFromURL_local_file_with_correct_checksum() {
|
||||||
// given
|
// given
|
||||||
val a = defaultTestContainer()
|
val prov = defaultTestContainer()
|
||||||
val srcFile = "file3.txt"
|
val srcFile = "file3.txt"
|
||||||
val targetFile = "file3b.txt"
|
val targetFile = "file3b.txt"
|
||||||
a.createFile("/tmp/" + srcFile, "hello")
|
prov.createFile("/tmp/" + srcFile, "hello")
|
||||||
|
|
||||||
// when
|
// when
|
||||||
val res = a.downloadFromURL("file:///tmp/" + srcFile, targetFile, "tmp", sha256sum ="2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824") // ubuntu 20.04 sha256sum version 8.30
|
val res = prov.downloadFromURL("file:///tmp/" + srcFile, targetFile, "tmp", sha256sum ="2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824") // ubuntu 20.04 sha256sum version 8.30
|
||||||
|
|
||||||
// then
|
// then
|
||||||
val res2 = a.fileContent("tmp/$targetFile")
|
val res2 = prov.fileContent("tmp/$targetFile")
|
||||||
|
|
||||||
assertEquals("hello", res2)
|
assertEquals("hello", res2)
|
||||||
assertTrue(res.success)
|
assertTrue(res.success)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ContainerTest
|
@ContainerTest
|
||||||
@Test
|
|
||||||
fun downloadFromURL_local_file_with_incorrect_checksum() {
|
fun downloadFromURL_local_file_with_incorrect_checksum() {
|
||||||
// given
|
// given
|
||||||
val prov = defaultTestContainer()
|
val prov = defaultTestContainer()
|
||||||
|
@ -73,6 +70,7 @@ internal class WebKtTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ContainerTest
|
@ContainerTest
|
||||||
|
@NonCi
|
||||||
fun findIpForHostname_finds_ip() {
|
fun findIpForHostname_finds_ip() {
|
||||||
// given
|
// given
|
||||||
val prov = defaultTestContainer()
|
val prov = defaultTestContainer()
|
||||||
|
@ -86,6 +84,7 @@ internal class WebKtTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ContainerTest
|
@ContainerTest
|
||||||
|
@NonCi
|
||||||
fun findIpForHostname_returns_null_if_ip_not_found() {
|
fun findIpForHostname_returns_null_if_ip_not_found() {
|
||||||
// given
|
// given
|
||||||
val prov = defaultTestContainer()
|
val prov = defaultTestContainer()
|
||||||
|
@ -98,7 +97,8 @@ internal class WebKtTest {
|
||||||
assertEquals(null, ip)
|
assertEquals(null, ip)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@ContainerTest
|
||||||
|
@NonCi
|
||||||
fun getIpForHostname_throws_exception_if_ip_not_found() {
|
fun getIpForHostname_throws_exception_if_ip_not_found() {
|
||||||
// given
|
// given
|
||||||
val prov = defaultTestContainer()
|
val prov = defaultTestContainer()
|
||||||
|
|
Loading…
Reference in a new issue