From ac6d989bb206b09b36eefb563be86303d461680f Mon Sep 17 00:00:00 2001 From: ansgarz Date: Sat, 29 Jan 2022 11:15:24 +0100 Subject: [PATCH] fix tests in pipeline --- .../framework/ubuntu/filesystem/base/FilesystemKtTest.kt | 1 + .../provs/server/infrastructure/NetworkKtTest.kt | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/FilesystemKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/FilesystemKtTest.kt index 9d6a5b4..98385bb 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/FilesystemKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/FilesystemKtTest.kt @@ -23,6 +23,7 @@ internal class FilesystemKtTest { fun test_createFile_locally() { // given val prov = testLocal() + prov.createDir("tmp") // when val filename = "tmp/testfile9" diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/NetworkKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/NetworkKtTest.kt index 1301707..f6d496b 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/NetworkKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/NetworkKtTest.kt @@ -1,22 +1,20 @@ package org.domaindrivenarchitecture.provs.server.infrastructure -import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.createDirs import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.fileContainsText import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall import org.domaindrivenarchitecture.provs.test.defaultTestContainer import org.domaindrivenarchitecture.provs.test.tags.ContainerTest +import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test -import org.junit.jupiter.api.Assertions.* - internal class NetworkKtTest { @Test @ContainerTest fun test_provisionNetwork() { // given - val p = defaultTestContainer(ContainerStartMode.CREATE_NEW_KILL_EXISTING) + val p = defaultTestContainer() p.task { aptInstall("dbus netplan.io") createDirs("/etc/netplan", sudo = true) @@ -24,6 +22,7 @@ internal class NetworkKtTest { } // when + @Suppress("UNUSED_VARIABLE") // see comments below: about netplan not working in unprivileged container++++ val res = p.provisionNetwork( "192.168.5.1", loopbackIpv6 = "fc00::5:1") // then