From 63c207c2e7527078f1fab8a1a492256717b0ce70 Mon Sep 17 00:00:00 2001 From: ansgarz Date: Fri, 25 Feb 2022 21:38:50 +0100 Subject: [PATCH] [skip ci] add tag extensivecontainertest --- .../desktop/infrastructure/DevOpsKtTest.kt | 8 +++--- .../desktop/infrastructure/PythonKtTest.kt | 6 ++--- .../firewall/ProvisionFirewallKtTest.kt | 8 +++--- .../workplace/ProvisionWorkplaceKtTest.kt | 4 +-- .../workplace/base/FakturamaKtTest.kt | 8 +++--- .../workplace/base/GopassBridgeKtTest.kt | 27 +++++++++---------- .../extensions/workplace/base/GopassKtTest.kt | 4 +-- .../framework/ubuntu/git/base/GitKtTest.kt | 2 +- .../provs/test/tags/Tags.kt | 16 +++++++++-- 9 files changed, 43 insertions(+), 40 deletions(-) diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/DevOpsKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/DevOpsKtTest.kt index 4957b43..afd79f9 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/DevOpsKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/DevOpsKtTest.kt @@ -1,18 +1,16 @@ package org.domaindrivenarchitecture.provs.desktop.infrastructure 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.createDirs 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.Test internal class DevOpsKtTest { - @Test - @ContainerTest + @ExtensiveContainerTest fun installKubectlAndTools() { // given defaultTestContainer().def { diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/PythonKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/PythonKtTest.kt index 36d37b6..e4d5d46 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/PythonKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/PythonKtTest.kt @@ -1,14 +1,12 @@ package org.domaindrivenarchitecture.provs.desktop.infrastructure 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.Test internal class PythonKtTest { - @Test - @ContainerTest + @ExtensiveContainerTest fun installPython() { // when val res = defaultTestContainer().installPython() diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/ProvisionFirewallKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/ProvisionFirewallKtTest.kt index 0f36708..708912b 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/ProvisionFirewallKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/ProvisionFirewallKtTest.kt @@ -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.ContainerStartMode 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.test.tags.ExtensiveContainerTest +import org.domaindrivenarchitecture.provs.test.tags.NonCi import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test internal class ProvisionFirewallKtTest { - @Test - @ContainerTest + @ExtensiveContainerTest @NonCi fun configureFirewall() { // given diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/ProvisionWorkplaceKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/ProvisionWorkplaceKtTest.kt index cba3619..74d4717 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/ProvisionWorkplaceKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/ProvisionWorkplaceKtTest.kt @@ -7,6 +7,7 @@ import org.domaindrivenarchitecture.provs.desktop.infrastructure.getConfig import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.fileExists 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.Test @@ -31,8 +32,7 @@ internal class ProvisionWorkplaceKtTest { } - @Test - @ContainerTest + @ExtensiveContainerTest fun provisionWorkplaceFromConfigFile() { // given val a = defaultTestContainer() diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/FakturamaKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/FakturamaKtTest.kt index faab262..a03ed88 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/FakturamaKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/FakturamaKtTest.kt @@ -1,15 +1,13 @@ 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.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.Test internal class FakturamaKtTest { - @Test - @ContainerTest + @ExtensiveContainerTest fun installFakturama() { // given val a = defaultTestContainer() diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/GopassBridgeKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/GopassBridgeKtTest.kt index e7faef2..5a1f3be 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/GopassBridgeKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/GopassBridgeKtTest.kt @@ -1,33 +1,33 @@ 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.ProvResult import org.domaindrivenarchitecture.provs.framework.core.Secret import org.domaindrivenarchitecture.provs.framework.core.docker.exitAndRmContainer import org.domaindrivenarchitecture.provs.framework.core.local import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode -import org.domaindrivenarchitecture.provs.test.defaultTestContainer -import org.domaindrivenarchitecture.provs.test.tags.ContainerTest -import org.domaindrivenarchitecture.provs.test.tags.NonCi +import org.domaindrivenarchitecture.provs.framework.extensions.test_keys.privateGPGSnakeoilKey +import org.domaindrivenarchitecture.provs.framework.extensions.test_keys.publicGPGSnakeoilKey import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall import org.domaindrivenarchitecture.provs.framework.ubuntu.keys.KeyPair 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.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.Test internal class GopassBridgeKtTest { - @ContainerTest - @Test + @ExtensiveContainerTest fun test_downloadGopassBridge() { // given local().exitAndRmContainer("provs_test") @@ -41,8 +41,7 @@ internal class GopassBridgeKtTest { assertTrue(res.success) } - @ContainerTest - @Test + @ExtensiveContainerTest @NonCi fun test_install_and_configure_GopassBridgeJsonApi() { // given diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/GopassKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/GopassKtTest.kt index a47a67f..49852a4 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/GopassKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/workplace/base/GopassKtTest.kt @@ -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.ubuntu.filesystem.base.* import org.domaindrivenarchitecture.provs.desktop.infrastructure.* +import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest import org.junit.jupiter.api.Assertions.assertFalse @@ -34,8 +35,7 @@ internal class GopassKtTest { assertFalse(res.success) } - @ContainerTest - @Test + @ExtensiveContainerTest fun test_installAndConfigureGopassAndMountStore() { // given val a = defaultTestContainer() diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/git/base/GitKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/git/base/GitKtTest.kt index 1de2758..a8f011f 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/git/base/GitKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/git/base/GitKtTest.kt @@ -38,7 +38,7 @@ internal class GitKtTest { // when 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 assertTrue(res.success) diff --git a/src/testFixtures/kotlin/org/domaindrivenarchitecture/provs/test/tags/Tags.kt b/src/testFixtures/kotlin/org/domaindrivenarchitecture/provs/test/tags/Tags.kt index bc24bc5..35b65c9 100644 --- a/src/testFixtures/kotlin/org/domaindrivenarchitecture/provs/test/tags/Tags.kt +++ b/src/testFixtures/kotlin/org/domaindrivenarchitecture/provs/test/tags/Tags.kt @@ -1,21 +1,33 @@ package org.domaindrivenarchitecture.provs.test.tags import org.junit.jupiter.api.Tag +import org.junit.jupiter.api.Tags import org.junit.jupiter.api.Test private const val CONTAINER_TEST = "containertest" +private const val EXTENSIVE_CONTAINER_TEST = "extensivecontainertest" private const val CONTAINER_TEST_NON_CI = "containernonci" @Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER) -@kotlin.annotation.Retention +@Retention @Tag(CONTAINER_TEST) @Test annotation class ContainerTest @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) @Test annotation class NonCi \ No newline at end of file