From 2394fa8b3e2115d541e1f822b1de193821136f18 Mon Sep 17 00:00:00 2001 From: dzikoysk Date: Tue, 11 Jul 2023 14:21:56 +0200 Subject: [PATCH] Cleanup test classes --- .../ExperimentalLocalSpecificationJunitExtension.kt | 2 +- .../ExperimentalRemoteSpecficiationJunitExtension.kt | 2 +- ...> RecommendedLocalSpecificationJunitExtension.kt} | 4 ++-- ... RecommendedRemoteSpecificationJunitExtension.kt} | 4 ++-- .../{specification => }/ReposiliteRunner.kt | 11 +++-------- .../{specification => }/ReposiliteSpecification.kt | 3 +-- .../configuration/SettingsIntegrationTest.kt | 8 ++++---- .../StartupParametersIntegrationTest.kt} | 11 ++++++----- .../SettingsIntegrationSpecification.kt | 2 +- .../reposilite/javadocs/JavadocsIntegrationTest.kt | 8 ++++---- .../JavadocsIntegrationSpecification.kt | 2 +- .../com/reposilite/maven/MavenApiIntegrationTest.kt | 8 ++++---- .../com/reposilite/maven/MavenIntegrationTest.kt | 10 ++++------ .../specification/MavenIntegrationSpecification.kt | 2 +- .../statistics/StatisticsIntegrationTest.kt | 12 ++++++------ .../StatisticsIntegrationSpecification.kt | 2 +- .../com/reposilite/status/StatusIntegrationTest.kt | 12 ++++++------ .../specification/StatusIntegrationSpecification.kt | 2 +- .../token/AccessTokenCommandsIntegrationTest.kt | 4 ++-- .../reposilite/token/AccessTokenIntegrationTest.kt | 8 ++++---- .../AccessTokenIntegrationSpecification.kt | 2 +- .../reposilite/{ => web}/BasePathIntegrationTest.kt | 8 ++++---- .../reposilite/{ => configuration}/ParametersTest.kt | 3 ++- 23 files changed, 62 insertions(+), 68 deletions(-) rename reposilite-backend/src/integration/kotlin/com/reposilite/{specification => }/ExperimentalLocalSpecificationJunitExtension.kt (97%) rename reposilite-backend/src/integration/kotlin/com/reposilite/{specification => }/ExperimentalRemoteSpecficiationJunitExtension.kt (98%) rename reposilite-backend/src/integration/kotlin/com/reposilite/{specification/LocalSpecificationJunitExtension.kt => RecommendedLocalSpecificationJunitExtension.kt} (91%) rename reposilite-backend/src/integration/kotlin/com/reposilite/{specification/RemoteSpecificationJunitExtension.kt => RecommendedRemoteSpecificationJunitExtension.kt} (95%) rename reposilite-backend/src/integration/kotlin/com/reposilite/{specification => }/ReposiliteRunner.kt (94%) rename reposilite-backend/src/integration/kotlin/com/reposilite/{specification => }/ReposiliteSpecification.kt (98%) rename reposilite-backend/src/integration/kotlin/com/reposilite/{ReposiliteParametersIntegrationTest.kt => configuration/StartupParametersIntegrationTest.kt} (84%) rename reposilite-backend/src/integration/kotlin/com/reposilite/{ => web}/BasePathIntegrationTest.kt (93%) rename reposilite-backend/src/test/kotlin/com/reposilite/{ => configuration}/ParametersTest.kt (93%) diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/ExperimentalLocalSpecificationJunitExtension.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/ExperimentalLocalSpecificationJunitExtension.kt similarity index 97% rename from reposilite-backend/src/integration/kotlin/com/reposilite/specification/ExperimentalLocalSpecificationJunitExtension.kt rename to reposilite-backend/src/integration/kotlin/com/reposilite/ExperimentalLocalSpecificationJunitExtension.kt index 0c7474a5c..d46ebde87 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/ExperimentalLocalSpecificationJunitExtension.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/ExperimentalLocalSpecificationJunitExtension.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.reposilite.specification +package com.reposilite import com.reposilite.storage.filesystem.FileSystemStorageProviderSettings import org.junit.jupiter.api.extension.BeforeEachCallback diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/ExperimentalRemoteSpecficiationJunitExtension.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/ExperimentalRemoteSpecficiationJunitExtension.kt similarity index 98% rename from reposilite-backend/src/integration/kotlin/com/reposilite/specification/ExperimentalRemoteSpecficiationJunitExtension.kt rename to reposilite-backend/src/integration/kotlin/com/reposilite/ExperimentalRemoteSpecficiationJunitExtension.kt index c789a06aa..54acbd404 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/ExperimentalRemoteSpecficiationJunitExtension.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/ExperimentalRemoteSpecficiationJunitExtension.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.reposilite.specification +package com.reposilite import com.reposilite.storage.filesystem.FileSystemStorageProviderSettings import org.junit.jupiter.api.extension.AfterEachCallback diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/LocalSpecificationJunitExtension.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/RecommendedLocalSpecificationJunitExtension.kt similarity index 91% rename from reposilite-backend/src/integration/kotlin/com/reposilite/specification/LocalSpecificationJunitExtension.kt rename to reposilite-backend/src/integration/kotlin/com/reposilite/RecommendedLocalSpecificationJunitExtension.kt index d9116eec0..91be45415 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/LocalSpecificationJunitExtension.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/RecommendedLocalSpecificationJunitExtension.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.reposilite.specification +package com.reposilite import com.reposilite.storage.filesystem.FileSystemStorageProviderSettings import org.junit.jupiter.api.extension.BeforeEachCallback @@ -26,7 +26,7 @@ import org.junit.jupiter.api.extension.ExtensionContext * - SQLite * - Local file system */ -internal class LocalSpecificationJunitExtension : Extension, BeforeEachCallback { +internal class RecommendedLocalSpecificationJunitExtension : Extension, BeforeEachCallback { override fun beforeEach(context: ExtensionContext?) { context?.also { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/RemoteSpecificationJunitExtension.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/RecommendedRemoteSpecificationJunitExtension.kt similarity index 95% rename from reposilite-backend/src/integration/kotlin/com/reposilite/specification/RemoteSpecificationJunitExtension.kt rename to reposilite-backend/src/integration/kotlin/com/reposilite/RecommendedRemoteSpecificationJunitExtension.kt index 6611305f3..f2d4ae75c 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/RemoteSpecificationJunitExtension.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/RecommendedRemoteSpecificationJunitExtension.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.reposilite.specification +package com.reposilite import com.reposilite.storage.s3.S3StorageProviderSettings import org.junit.jupiter.api.extension.AfterEachCallback @@ -34,7 +34,7 @@ import org.testcontainers.utility.DockerImageName * - AWS S3 through LocalStack */ @Testcontainers -internal class RemoteSpecificationJunitExtension : Extension, BeforeEachCallback, AfterEachCallback { +internal class RecommendedRemoteSpecificationJunitExtension : Extension, BeforeEachCallback, AfterEachCallback { private class SpecifiedMariaDBContainer(image: String) : MariaDBContainer(DockerImageName.parse(image)) diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/ReposiliteRunner.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/ReposiliteRunner.kt similarity index 94% rename from reposilite-backend/src/integration/kotlin/com/reposilite/specification/ReposiliteRunner.kt rename to reposilite-backend/src/integration/kotlin/com/reposilite/ReposiliteRunner.kt index ed49e3c3b..63fccd91e 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/ReposiliteRunner.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/ReposiliteRunner.kt @@ -14,11 +14,8 @@ * limitations under the License. */ -package com.reposilite.specification +package com.reposilite -import com.reposilite.Reposilite -import com.reposilite.ReposiliteFactory -import com.reposilite.ReposiliteParameters import com.reposilite.configuration.local.LocalConfiguration import com.reposilite.configuration.local.infrastructure.LOCAL_CONFIGURATION_FILE import com.reposilite.configuration.shared.SharedConfigurationFacade @@ -38,15 +35,13 @@ import org.junit.jupiter.api.io.TempDir import panda.std.Result import panda.std.reactive.ReferenceUtils import java.io.File -import java.io.PrintStream -import java.nio.file.Files import java.util.concurrent.ThreadLocalRandom /** * This is a dirty launcher of Reposilite instance for integration tests. * Every integration test is launched twice, with local and remote integrations, through dedicated extensions: - * - [LocalSpecificationJunitExtension] - * - [RemoteSpecificationJunitExtension] + * - [RecommendedLocalSpecificationJunitExtension] + * - [RecommendedRemoteSpecificationJunitExtension] */ @Suppress("PropertyName") internal abstract class ReposiliteRunner { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/ReposiliteSpecification.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/ReposiliteSpecification.kt similarity index 98% rename from reposilite-backend/src/integration/kotlin/com/reposilite/specification/ReposiliteSpecification.kt rename to reposilite-backend/src/integration/kotlin/com/reposilite/ReposiliteSpecification.kt index b10bf7647..7edaed6a6 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/specification/ReposiliteSpecification.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/ReposiliteSpecification.kt @@ -14,9 +14,8 @@ * limitations under the License. */ -package com.reposilite.specification +package com.reposilite -import com.reposilite.ReposiliteObjectMapper import com.reposilite.maven.MavenFacade import com.reposilite.maven.api.DeployRequest import com.reposilite.maven.api.Metadata diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/configuration/SettingsIntegrationTest.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/configuration/SettingsIntegrationTest.kt index 380183fd9..56fcb8d7c 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/configuration/SettingsIntegrationTest.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/configuration/SettingsIntegrationTest.kt @@ -26,8 +26,8 @@ import com.reposilite.configuration.specification.SettingsIntegrationSpecificati import com.reposilite.frontend.application.FrontendSettings import com.reposilite.maven.application.MavenSettings import com.reposilite.shared.ErrorResponse -import com.reposilite.specification.LocalSpecificationJunitExtension -import com.reposilite.specification.RemoteSpecificationJunitExtension +import com.reposilite.RecommendedLocalSpecificationJunitExtension +import com.reposilite.RecommendedRemoteSpecificationJunitExtension import com.reposilite.statistics.api.ResolvedRequestsInterval.YEARLY import com.reposilite.statistics.application.StatisticsSettings import com.reposilite.web.application.WebSettings @@ -38,10 +38,10 @@ import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith -@ExtendWith(LocalSpecificationJunitExtension::class) +@ExtendWith(RecommendedLocalSpecificationJunitExtension::class) internal class LocalSettingsIntegrationTest : SettingsIntegrationTest() -@ExtendWith(RemoteSpecificationJunitExtension::class) +@ExtendWith(RecommendedRemoteSpecificationJunitExtension::class) internal class RemoteSettingsIntegrationTest : SettingsIntegrationTest() internal abstract class SettingsIntegrationTest : SettingsIntegrationSpecification() { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/ReposiliteParametersIntegrationTest.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/configuration/StartupParametersIntegrationTest.kt similarity index 84% rename from reposilite-backend/src/integration/kotlin/com/reposilite/ReposiliteParametersIntegrationTest.kt rename to reposilite-backend/src/integration/kotlin/com/reposilite/configuration/StartupParametersIntegrationTest.kt index 99c76d2b6..d297f41f6 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/ReposiliteParametersIntegrationTest.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/configuration/StartupParametersIntegrationTest.kt @@ -16,19 +16,20 @@ @file:Suppress("FunctionName") -package com.reposilite +package com.reposilite.configuration +import com.reposilite.ReposiliteParameters import com.reposilite.configuration.shared.SharedConfigurationFacade import com.reposilite.frontend.application.FrontendSettings -import com.reposilite.specification.LocalSpecificationJunitExtension -import com.reposilite.specification.ReposiliteSpecification +import com.reposilite.RecommendedLocalSpecificationJunitExtension +import com.reposilite.ReposiliteSpecification import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith import java.nio.file.Files -@ExtendWith(LocalSpecificationJunitExtension::class) -internal class ReposiliteParametersIntegrationTest : ReposiliteSpecification() { +@ExtendWith(RecommendedLocalSpecificationJunitExtension::class) +internal class StartupParametersIntegrationTest : ReposiliteSpecification() { override fun overrideParameters(parameters: ReposiliteParameters) { // given: a custom shared configuration diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/configuration/specification/SettingsIntegrationSpecification.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/configuration/specification/SettingsIntegrationSpecification.kt index 23116aab2..bc2eac6e0 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/configuration/specification/SettingsIntegrationSpecification.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/configuration/specification/SettingsIntegrationSpecification.kt @@ -16,6 +16,6 @@ package com.reposilite.configuration.specification -import com.reposilite.specification.ReposiliteSpecification +import com.reposilite.ReposiliteSpecification internal abstract class SettingsIntegrationSpecification : ReposiliteSpecification() \ No newline at end of file diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/javadocs/JavadocsIntegrationTest.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/javadocs/JavadocsIntegrationTest.kt index 00b47f390..a48ff5710 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/javadocs/JavadocsIntegrationTest.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/javadocs/JavadocsIntegrationTest.kt @@ -3,18 +3,18 @@ package com.reposilite.javadocs import com.reposilite.javadocs.specification.JavadocsIntegrationSpecification -import com.reposilite.specification.LocalSpecificationJunitExtension -import com.reposilite.specification.RemoteSpecificationJunitExtension +import com.reposilite.RecommendedLocalSpecificationJunitExtension +import com.reposilite.RecommendedRemoteSpecificationJunitExtension import com.reposilite.storage.api.Location import kong.unirest.Unirest.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith -@ExtendWith(LocalSpecificationJunitExtension::class) +@ExtendWith(RecommendedLocalSpecificationJunitExtension::class) internal class LocalJavadocsIntegrationTest : JavadocsIntegrationTest() -@ExtendWith(RemoteSpecificationJunitExtension::class) +@ExtendWith(RecommendedRemoteSpecificationJunitExtension::class) internal class RemoteJavadocsIntegrationTest : JavadocsIntegrationTest() internal abstract class JavadocsIntegrationTest : JavadocsIntegrationSpecification() { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/javadocs/specification/JavadocsIntegrationSpecification.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/javadocs/specification/JavadocsIntegrationSpecification.kt index 4d157ff0f..5f9ced4f2 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/javadocs/specification/JavadocsIntegrationSpecification.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/javadocs/specification/JavadocsIntegrationSpecification.kt @@ -1,5 +1,5 @@ package com.reposilite.javadocs.specification -import com.reposilite.specification.ReposiliteSpecification +import com.reposilite.ReposiliteSpecification internal abstract class JavadocsIntegrationSpecification : ReposiliteSpecification() diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/maven/MavenApiIntegrationTest.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/maven/MavenApiIntegrationTest.kt index 1b2cc0ca9..93cd30391 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/maven/MavenApiIntegrationTest.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/maven/MavenApiIntegrationTest.kt @@ -19,8 +19,8 @@ package com.reposilite.maven import com.reposilite.maven.specification.MavenIntegrationSpecification -import com.reposilite.specification.LocalSpecificationJunitExtension -import com.reposilite.specification.RemoteSpecificationJunitExtension +import com.reposilite.RecommendedLocalSpecificationJunitExtension +import com.reposilite.RecommendedRemoteSpecificationJunitExtension import com.reposilite.token.RoutePermission.READ import io.javalin.http.HttpStatus.UNAUTHORIZED import kong.unirest.Unirest.get @@ -30,10 +30,10 @@ import org.junit.jupiter.api.extension.ExtendWith import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.ValueSource -@ExtendWith(LocalSpecificationJunitExtension::class) +@ExtendWith(RecommendedLocalSpecificationJunitExtension::class) internal class LocalMavenApiIntegrationTest : MavenApiIntegrationTest() -@ExtendWith(RemoteSpecificationJunitExtension::class) +@ExtendWith(RecommendedRemoteSpecificationJunitExtension::class) internal class RemoteMavenApiIntegrationTest : MavenApiIntegrationTest() internal abstract class MavenApiIntegrationTest : MavenIntegrationSpecification() { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/maven/MavenIntegrationTest.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/maven/MavenIntegrationTest.kt index 6851c3192..1be3887f1 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/maven/MavenIntegrationTest.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/maven/MavenIntegrationTest.kt @@ -19,12 +19,10 @@ package com.reposilite.maven import com.reposilite.configuration.local.LocalConfiguration -import com.reposilite.configuration.shared.SharedConfigurationFacade -import com.reposilite.maven.application.MavenSettings import com.reposilite.maven.specification.MavenIntegrationSpecification import com.reposilite.shared.ErrorResponse -import com.reposilite.specification.LocalSpecificationJunitExtension -import com.reposilite.specification.RemoteSpecificationJunitExtension +import com.reposilite.RecommendedLocalSpecificationJunitExtension +import com.reposilite.RecommendedRemoteSpecificationJunitExtension import com.reposilite.storage.api.DocumentInfo import io.javalin.http.HttpStatus.NOT_FOUND import io.javalin.http.HttpStatus.UNAUTHORIZED @@ -40,10 +38,10 @@ import org.junit.jupiter.api.extension.ExtendWith import java.util.concurrent.CompletableFuture import java.util.concurrent.CountDownLatch -@ExtendWith(LocalSpecificationJunitExtension::class) +@ExtendWith(RecommendedLocalSpecificationJunitExtension::class) internal class LocalMavenIntegrationTest : MavenIntegrationTest() -@ExtendWith(RemoteSpecificationJunitExtension::class) +@ExtendWith(RecommendedRemoteSpecificationJunitExtension::class) internal class RemoteMavenIntegrationTest : MavenIntegrationTest() internal abstract class MavenIntegrationTest : MavenIntegrationSpecification() { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/maven/specification/MavenIntegrationSpecification.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/maven/specification/MavenIntegrationSpecification.kt index 63ecf2d57..5d28c4419 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/maven/specification/MavenIntegrationSpecification.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/maven/specification/MavenIntegrationSpecification.kt @@ -16,7 +16,7 @@ package com.reposilite.maven.specification -import com.reposilite.specification.ReposiliteSpecification +import com.reposilite.ReposiliteSpecification import io.javalin.Javalin import kotlinx.coroutines.Job diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/statistics/StatisticsIntegrationTest.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/statistics/StatisticsIntegrationTest.kt index 414c986ec..bb2b5770b 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/statistics/StatisticsIntegrationTest.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/statistics/StatisticsIntegrationTest.kt @@ -19,10 +19,10 @@ package com.reposilite.statistics import com.reposilite.maven.api.Identifier -import com.reposilite.specification.ExperimentalLocalSpecificationJunitExtension -import com.reposilite.specification.ExperimentalRemoteSpecficiationJunitExtension -import com.reposilite.specification.LocalSpecificationJunitExtension -import com.reposilite.specification.RemoteSpecificationJunitExtension +import com.reposilite.ExperimentalLocalSpecificationJunitExtension +import com.reposilite.ExperimentalRemoteSpecficiationJunitExtension +import com.reposilite.RecommendedLocalSpecificationJunitExtension +import com.reposilite.RecommendedRemoteSpecificationJunitExtension import com.reposilite.statistics.api.AllResolvedResponse import com.reposilite.statistics.api.IntervalRecord import com.reposilite.statistics.api.RepositoryStatistics @@ -44,13 +44,13 @@ import java.time.temporal.ChronoUnit @ExtendWith(ExperimentalRemoteSpecficiationJunitExtension::class) internal class ExperimentalRemoteStatisticsIntegrationTest : StatisticsIntegrationTest() -@ExtendWith(RemoteSpecificationJunitExtension::class) +@ExtendWith(RecommendedRemoteSpecificationJunitExtension::class) internal class RemoteStatisticsIntegrationTest : StatisticsIntegrationTest() @ExtendWith(ExperimentalLocalSpecificationJunitExtension::class) internal class ExperimentalLocalStatisticsIntegrationTest : StatisticsIntegrationTest() -@ExtendWith(LocalSpecificationJunitExtension::class) +@ExtendWith(RecommendedLocalSpecificationJunitExtension::class) internal class LocalStatisticsIntegrationTest : StatisticsIntegrationTest() internal abstract class StatisticsIntegrationTest : StatisticsIntegrationSpecification() { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/statistics/specification/StatisticsIntegrationSpecification.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/statistics/specification/StatisticsIntegrationSpecification.kt index daaeb8c0e..b6bcd5a09 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/statistics/specification/StatisticsIntegrationSpecification.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/statistics/specification/StatisticsIntegrationSpecification.kt @@ -16,7 +16,7 @@ package com.reposilite.statistics.specification -import com.reposilite.specification.ReposiliteSpecification +import com.reposilite.ReposiliteSpecification import com.reposilite.maven.api.Identifier import com.reposilite.statistics.StatisticsFacade import io.javalin.http.HttpStatus.OK diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/status/StatusIntegrationTest.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/status/StatusIntegrationTest.kt index 7ef9f9413..4d2ee1e39 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/status/StatusIntegrationTest.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/status/StatusIntegrationTest.kt @@ -19,10 +19,10 @@ package com.reposilite.status import com.reposilite.VERSION -import com.reposilite.specification.ExperimentalLocalSpecificationJunitExtension -import com.reposilite.specification.ExperimentalRemoteSpecficiationJunitExtension -import com.reposilite.specification.LocalSpecificationJunitExtension -import com.reposilite.specification.RemoteSpecificationJunitExtension +import com.reposilite.ExperimentalLocalSpecificationJunitExtension +import com.reposilite.ExperimentalRemoteSpecficiationJunitExtension +import com.reposilite.RecommendedLocalSpecificationJunitExtension +import com.reposilite.RecommendedRemoteSpecificationJunitExtension import com.reposilite.status.api.InstanceStatusResponse import com.reposilite.status.api.StatusSnapshot import com.reposilite.status.specification.StatusIntegrationSpecification @@ -37,13 +37,13 @@ import org.junit.jupiter.api.extension.ExtendWith @ExtendWith(ExperimentalRemoteSpecficiationJunitExtension::class) internal class ExperimentalRemoteStatusIntegrationTest : StatusIntegrationTest() -@ExtendWith(RemoteSpecificationJunitExtension::class) +@ExtendWith(RecommendedRemoteSpecificationJunitExtension::class) internal class RemoteStatusIntegrationTest : StatusIntegrationTest() @ExtendWith(ExperimentalLocalSpecificationJunitExtension::class) internal class ExperimentalLocalStatusIntegrationTest : StatusIntegrationTest() -@ExtendWith(LocalSpecificationJunitExtension::class) +@ExtendWith(RecommendedLocalSpecificationJunitExtension::class) internal class LocalStatusIntegrationTest : StatusIntegrationTest() internal abstract class StatusIntegrationTest : StatusIntegrationSpecification() { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/status/specification/StatusIntegrationSpecification.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/status/specification/StatusIntegrationSpecification.kt index 99d1dfc8f..281b63dc9 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/status/specification/StatusIntegrationSpecification.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/status/specification/StatusIntegrationSpecification.kt @@ -16,7 +16,7 @@ package com.reposilite.status.specification -import com.reposilite.specification.ReposiliteSpecification +import com.reposilite.ReposiliteSpecification internal abstract class StatusIntegrationSpecification : ReposiliteSpecification() { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/token/AccessTokenCommandsIntegrationTest.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/token/AccessTokenCommandsIntegrationTest.kt index b08eb7c5c..3634634d4 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/token/AccessTokenCommandsIntegrationTest.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/token/AccessTokenCommandsIntegrationTest.kt @@ -18,7 +18,7 @@ package com.reposilite.token -import com.reposilite.specification.LocalSpecificationJunitExtension +import com.reposilite.RecommendedLocalSpecificationJunitExtension import com.reposilite.console.CommandStatus.SUCCEEDED import com.reposilite.console.ConsoleFacade import com.reposilite.token.AccessTokenPermission.MANAGER @@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith import panda.std.ResultAssertions.assertOk -@ExtendWith(LocalSpecificationJunitExtension::class) +@ExtendWith(RecommendedLocalSpecificationJunitExtension::class) internal class LocalAccessTokenCommandsIntegrationTest : AccessTokenCommandsIntegrationTest() internal abstract class AccessTokenCommandsIntegrationTest : AccessTokenIntegrationSpecification() { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/token/AccessTokenIntegrationTest.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/token/AccessTokenIntegrationTest.kt index 07684cacb..bdc7c6e3f 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/token/AccessTokenIntegrationTest.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/token/AccessTokenIntegrationTest.kt @@ -19,8 +19,8 @@ package com.reposilite.token import com.reposilite.shared.ErrorResponse -import com.reposilite.specification.LocalSpecificationJunitExtension -import com.reposilite.specification.RemoteSpecificationJunitExtension +import com.reposilite.RecommendedLocalSpecificationJunitExtension +import com.reposilite.RecommendedRemoteSpecificationJunitExtension import com.reposilite.token.AccessTokenPermission.MANAGER import com.reposilite.token.AccessTokenType.PERSISTENT import com.reposilite.token.api.AccessTokenDto @@ -36,10 +36,10 @@ import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith -@ExtendWith(LocalSpecificationJunitExtension::class) +@ExtendWith(RecommendedLocalSpecificationJunitExtension::class) internal class LocalAccessTokenIntegrationTest : AccessTokenIntegrationTest() -@ExtendWith(RemoteSpecificationJunitExtension::class) +@ExtendWith(RecommendedRemoteSpecificationJunitExtension::class) internal class RemoteAccessTokenIntegrationTest : AccessTokenIntegrationTest() internal abstract class AccessTokenIntegrationTest : AccessTokenIntegrationSpecification() { diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/token/specification/AccessTokenIntegrationSpecification.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/token/specification/AccessTokenIntegrationSpecification.kt index 61c82ea21..fad979c4a 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/token/specification/AccessTokenIntegrationSpecification.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/token/specification/AccessTokenIntegrationSpecification.kt @@ -16,7 +16,7 @@ package com.reposilite.token.specification -import com.reposilite.specification.ReposiliteSpecification +import com.reposilite.ReposiliteSpecification import com.reposilite.auth.AuthenticationFacade import com.reposilite.auth.api.SessionDetails import com.reposilite.token.AccessTokenFacade diff --git a/reposilite-backend/src/integration/kotlin/com/reposilite/BasePathIntegrationTest.kt b/reposilite-backend/src/integration/kotlin/com/reposilite/web/BasePathIntegrationTest.kt similarity index 93% rename from reposilite-backend/src/integration/kotlin/com/reposilite/BasePathIntegrationTest.kt rename to reposilite-backend/src/integration/kotlin/com/reposilite/web/BasePathIntegrationTest.kt index 86315904e..ad0ad2615 100644 --- a/reposilite-backend/src/integration/kotlin/com/reposilite/BasePathIntegrationTest.kt +++ b/reposilite-backend/src/integration/kotlin/com/reposilite/web/BasePathIntegrationTest.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.reposilite +package com.reposilite.web import com.reposilite.configuration.local.LocalConfiguration -import com.reposilite.specification.LocalSpecificationJunitExtension -import com.reposilite.specification.ReposiliteSpecification +import com.reposilite.RecommendedLocalSpecificationJunitExtension +import com.reposilite.ReposiliteSpecification import io.javalin.Javalin import io.javalin.http.Context import kong.unirest.HttpRequest @@ -32,7 +32,7 @@ import kotlin.io.path.createDirectories import kotlin.io.path.createFile import kotlin.io.path.writeText -@ExtendWith(LocalSpecificationJunitExtension::class) +@ExtendWith(RecommendedLocalSpecificationJunitExtension::class) internal class BasePathIntegrationTest : ReposiliteSpecification() { private val basePath = "/custom-base-path" diff --git a/reposilite-backend/src/test/kotlin/com/reposilite/ParametersTest.kt b/reposilite-backend/src/test/kotlin/com/reposilite/configuration/ParametersTest.kt similarity index 93% rename from reposilite-backend/src/test/kotlin/com/reposilite/ParametersTest.kt rename to reposilite-backend/src/test/kotlin/com/reposilite/configuration/ParametersTest.kt index a3ec155e8..46dbcc9b1 100644 --- a/reposilite-backend/src/test/kotlin/com/reposilite/ParametersTest.kt +++ b/reposilite-backend/src/test/kotlin/com/reposilite/configuration/ParametersTest.kt @@ -1,7 +1,8 @@ -package com.reposilite +package com.reposilite.configuration import com.reposilite.configuration.local.infrastructure.LOCAL_CONFIGURATION_FILE import com.reposilite.configuration.shared.infrastructure.SHARED_CONFIGURATION_FILE +import com.reposilite.createWithParameters import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test import org.junit.jupiter.api.io.TempDir