[skip ci] add tag extensivecontainertest

This commit is contained in:
ansgarz 2022-02-25 21:38:50 +01:00
parent 324b545714
commit 63c207c2e7
9 changed files with 43 additions and 40 deletions

View file

@ -1,18 +1,16 @@
package org.domaindrivenarchitecture.provs.desktop.infrastructure package org.domaindrivenarchitecture.provs.desktop.infrastructure
import org.domaindrivenarchitecture.provs.framework.core.getResourceAsText import org.domaindrivenarchitecture.provs.framework.core.getResourceAsText
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.createDir import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.createDir
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.createDirs import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.createDirs
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.fileContainsText import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.fileContainsText
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest
import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
internal class DevOpsKtTest { internal class DevOpsKtTest {
@Test @ExtensiveContainerTest
@ContainerTest
fun installKubectlAndTools() { fun installKubectlAndTools() {
// given // given
defaultTestContainer().def { defaultTestContainer().def {

View file

@ -1,14 +1,12 @@
package org.domaindrivenarchitecture.provs.desktop.infrastructure package org.domaindrivenarchitecture.provs.desktop.infrastructure
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.ExtensiveContainerTest
import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
internal class PythonKtTest { internal class PythonKtTest {
@Test @ExtensiveContainerTest
@ContainerTest
fun installPython() { fun installPython() {
// when // when
val res = defaultTestContainer().installPython() val res = defaultTestContainer().installPython()

View file

@ -8,17 +8,15 @@ import org.domaindrivenarchitecture.provs.framework.core.local
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerEndMode import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerEndMode
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerUbuntuHostProcessor import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerUbuntuHostProcessor
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
import org.domaindrivenarchitecture.provs.test.tags.NonCi
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest
import org.domaindrivenarchitecture.provs.test.tags.NonCi
import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
internal class ProvisionFirewallKtTest { internal class ProvisionFirewallKtTest {
@Test @ExtensiveContainerTest
@ContainerTest
@NonCi @NonCi
fun configureFirewall() { fun configureFirewall() {
// given // given

View file

@ -7,6 +7,7 @@ import org.domaindrivenarchitecture.provs.desktop.infrastructure.getConfig
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.fileExists import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.fileExists
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.ExtensiveContainerTest
import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
@ -31,8 +32,7 @@ internal class ProvisionWorkplaceKtTest {
} }
@Test @ExtensiveContainerTest
@ContainerTest
fun provisionWorkplaceFromConfigFile() { fun provisionWorkplaceFromConfigFile() {
// given // given
val a = defaultTestContainer() val a = defaultTestContainer()

View file

@ -1,15 +1,13 @@
package org.domaindrivenarchitecture.provs.framework.extensions.workplace.base package org.domaindrivenarchitecture.provs.framework.extensions.workplace.base
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
import org.domaindrivenarchitecture.provs.desktop.infrastructure.installFakturama import org.domaindrivenarchitecture.provs.desktop.infrastructure.installFakturama
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest
import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
internal class FakturamaKtTest { internal class FakturamaKtTest {
@Test @ExtensiveContainerTest
@ContainerTest
fun installFakturama() { fun installFakturama() {
// given // given
val a = defaultTestContainer() val a = defaultTestContainer()

View file

@ -1,33 +1,33 @@
package org.domaindrivenarchitecture.provs.framework.extensions.workplace.base package org.domaindrivenarchitecture.provs.framework.extensions.workplace.base
import org.domaindrivenarchitecture.provs.desktop.infrastructure.configureGopassBridgeJsonApi
import org.domaindrivenarchitecture.provs.desktop.infrastructure.downloadGopassBridge
import org.domaindrivenarchitecture.provs.desktop.infrastructure.installGopass
import org.domaindrivenarchitecture.provs.desktop.infrastructure.installGopassBridgeJsonApi
import org.domaindrivenarchitecture.provs.framework.core.Prov import org.domaindrivenarchitecture.provs.framework.core.Prov
import org.domaindrivenarchitecture.provs.framework.core.ProvResult import org.domaindrivenarchitecture.provs.framework.core.ProvResult
import org.domaindrivenarchitecture.provs.framework.core.Secret import org.domaindrivenarchitecture.provs.framework.core.Secret
import org.domaindrivenarchitecture.provs.framework.core.docker.exitAndRmContainer import org.domaindrivenarchitecture.provs.framework.core.docker.exitAndRmContainer
import org.domaindrivenarchitecture.provs.framework.core.local import org.domaindrivenarchitecture.provs.framework.core.local
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
import org.domaindrivenarchitecture.provs.test.defaultTestContainer import org.domaindrivenarchitecture.provs.framework.extensions.test_keys.privateGPGSnakeoilKey
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest import org.domaindrivenarchitecture.provs.framework.extensions.test_keys.publicGPGSnakeoilKey
import org.domaindrivenarchitecture.provs.test.tags.NonCi
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
import org.domaindrivenarchitecture.provs.framework.ubuntu.keys.KeyPair import org.domaindrivenarchitecture.provs.framework.ubuntu.keys.KeyPair
import org.domaindrivenarchitecture.provs.framework.ubuntu.keys.base.configureGpgKeys import org.domaindrivenarchitecture.provs.framework.ubuntu.keys.base.configureGpgKeys
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest
import org.domaindrivenarchitecture.provs.test.tags.NonCi
import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertFalse
import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import org.domaindrivenarchitecture.provs.framework.extensions.test_keys.privateGPGSnakeoilKey
import org.domaindrivenarchitecture.provs.framework.extensions.test_keys.publicGPGSnakeoilKey
import org.domaindrivenarchitecture.provs.desktop.infrastructure.configureGopassBridgeJsonApi
import org.domaindrivenarchitecture.provs.desktop.infrastructure.downloadGopassBridge
import org.domaindrivenarchitecture.provs.desktop.infrastructure.installGopass
import org.domaindrivenarchitecture.provs.desktop.infrastructure.installGopassBridgeJsonApi
import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
internal class GopassBridgeKtTest { internal class GopassBridgeKtTest {
@ContainerTest @ExtensiveContainerTest
@Test
fun test_downloadGopassBridge() { fun test_downloadGopassBridge() {
// given // given
local().exitAndRmContainer("provs_test") local().exitAndRmContainer("provs_test")
@ -41,8 +41,7 @@ internal class GopassBridgeKtTest {
assertTrue(res.success) assertTrue(res.success)
} }
@ContainerTest @ExtensiveContainerTest
@Test
@NonCi @NonCi
fun test_install_and_configure_GopassBridgeJsonApi() { fun test_install_and_configure_GopassBridgeJsonApi() {
// given // given

View file

@ -16,6 +16,7 @@ import org.domaindrivenarchitecture.provs.framework.extensions.test_keys.private
import org.domaindrivenarchitecture.provs.framework.extensions.test_keys.publicGPGSnakeoilKey import org.domaindrivenarchitecture.provs.framework.extensions.test_keys.publicGPGSnakeoilKey
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.* import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.*
import org.domaindrivenarchitecture.provs.desktop.infrastructure.* import org.domaindrivenarchitecture.provs.desktop.infrastructure.*
import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest
import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertFalse
@ -34,8 +35,7 @@ internal class GopassKtTest {
assertFalse(res.success) assertFalse(res.success)
} }
@ContainerTest @ExtensiveContainerTest
@Test
fun test_installAndConfigureGopassAndMountStore() { fun test_installAndConfigureGopassAndMountStore() {
// given // given
val a = defaultTestContainer() val a = defaultTestContainer()

View file

@ -38,7 +38,7 @@ internal class GitKtTest {
// when // when
prov.trustGithub() prov.trustGithub()
val res = prov.gitClone("https://github.com/DomainDrivenArchitecture/dda-git-crate.git", "~/") val res = prov.gitClone("https://gitlab.com/domaindrivenarchitecture/overview.git", "~/")
// then // then
assertTrue(res.success) assertTrue(res.success)

View file

@ -1,21 +1,33 @@
package org.domaindrivenarchitecture.provs.test.tags package org.domaindrivenarchitecture.provs.test.tags
import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Tag
import org.junit.jupiter.api.Tags
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
private const val CONTAINER_TEST = "containertest" private const val CONTAINER_TEST = "containertest"
private const val EXTENSIVE_CONTAINER_TEST = "extensivecontainertest"
private const val CONTAINER_TEST_NON_CI = "containernonci" private const val CONTAINER_TEST_NON_CI = "containernonci"
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER) @Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
@kotlin.annotation.Retention @Retention
@Tag(CONTAINER_TEST) @Tag(CONTAINER_TEST)
@Test @Test
annotation class ContainerTest annotation class ContainerTest
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER) @Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
@kotlin.annotation.Retention @Retention
@Tags(
Tag(CONTAINER_TEST),
Tag(EXTENSIVE_CONTAINER_TEST)
)
@Test
annotation class ExtensiveContainerTest
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
@Retention
@Tag(CONTAINER_TEST_NON_CI) @Tag(CONTAINER_TEST_NON_CI)
@Test @Test
annotation class NonCi annotation class NonCi