From c884bc8c6ea7ba9ea28c312ee39097a6b858d3bd Mon Sep 17 00:00:00 2001 From: Mirco <mirco.zachmann@meissa.de> Date: Fri, 31 Jan 2025 18:36:38 +0100 Subject: [PATCH] [skip ci] remove .ContainerStartMode with params, dev_doc to containerTest --- doc/dev/containerTest.md | 11 +++++++++++ .../provs/desktop/infrastructure/GoKtTest.kt | 2 -- .../provs/desktop/infrastructure/NpmByNvmKtTest.kt | 3 +-- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 doc/dev/containerTest.md diff --git a/doc/dev/containerTest.md b/doc/dev/containerTest.md new file mode 100644 index 0000000..d123174 --- /dev/null +++ b/doc/dev/containerTest.md @@ -0,0 +1,11 @@ +Should be added in dev_circumstances for single unit tests to get repeatable results ('fresh container'): +ContainerStartMode.CREATE_NEW_KILL_EXISTING + +like this way: ++import org.domaindrivenarchitecture.provs.test.tags.ContainerTest + +//annotate to ContainerTest ++@ContainerTest + +//and configured Testcontainer ++val container = defaultTestContainer(ContainerStartMode.CREATE_NEW_KILL_EXISTING) \ No newline at end of file diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GoKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GoKtTest.kt index 5fe6127..0ba627d 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GoKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/GoKtTest.kt @@ -1,7 +1,5 @@ package org.domaindrivenarchitecture.provs.desktop.infrastructure -import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode -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 diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NpmByNvmKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NpmByNvmKtTest.kt index 5e016cd..3d8866a 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NpmByNvmKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/NpmByNvmKtTest.kt @@ -1,6 +1,5 @@ package org.domaindrivenarchitecture.provs.desktop.infrastructure -import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall import org.domaindrivenarchitecture.provs.test.defaultTestContainer import org.domaindrivenarchitecture.provs.test.tags.ContainerTest @@ -11,7 +10,7 @@ internal class NpmByNvmKtTest { @ContainerTest fun installNVMnpm() { // given - val container = defaultTestContainer(ContainerStartMode.CREATE_NEW_KILL_EXISTING) + val container = defaultTestContainer() container.aptInstall("curl") // when val res01 = container.installNpmByNvm()