correct test_createFile_in_container
This commit is contained in:
parent
8846c9c170
commit
e7c2c73907
1 changed files with 6 additions and 11 deletions
|
@ -1,6 +1,5 @@
|
||||||
package org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base
|
package org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base
|
||||||
|
|
||||||
import org.domaindrivenarchitecture.provs.framework.core.getResourceAsText
|
|
||||||
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.testLocal
|
import org.domaindrivenarchitecture.provs.test.testLocal
|
||||||
|
@ -40,22 +39,18 @@ internal class FilesystemKtTest {
|
||||||
@ContainerTest
|
@ContainerTest
|
||||||
fun test_createFile_in_container() {
|
fun test_createFile_in_container() {
|
||||||
// given
|
// given
|
||||||
val prov = testLocal() //defaultTestContainer()
|
val prov = defaultTestContainer()
|
||||||
val filename = "tmp/testfile11"
|
val filename = "testfile8"
|
||||||
|
|
||||||
val testtext = getResourceAsText("org/domaindrivenarchitecture/provs/infrastructure/k3s/" + "cert-manager.yaml")
|
|
||||||
|
|
||||||
println("aaaaaaaaaaaaaaaaaa len: " + testtext.length)
|
|
||||||
|
|
||||||
// when
|
// when
|
||||||
val res = prov.createFile(filename, testtext, overwriteIfExisting = true)
|
val res = prov.createFile(filename, testtext)
|
||||||
// val res2 = prov.createFile("sudo$filename", testtext, sudo = true)
|
val res2 = prov.createFile("sudo$filename", testtext, sudo = true)
|
||||||
|
|
||||||
// then
|
// then
|
||||||
assertTrue(res.success)
|
assertTrue(res.success)
|
||||||
// assertTrue(res2.success)
|
assertTrue(res2.success)
|
||||||
assertEquals(testtext, prov.fileContent(filename))
|
assertEquals(testtext, prov.fileContent(filename))
|
||||||
// assertEquals(testtext, prov.fileContent("sudo$filename"))
|
assertEquals(testtext, prov.fileContent("sudo$filename"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue