From 969c50156c22089263fde2b8385d1dd2e3a1640e Mon Sep 17 00:00:00 2001 From: Sergey Okatov Date: Wed, 2 Oct 2024 11:04:21 +0500 Subject: [PATCH] M7l3 PostgreSQL FIXES --- .gitignore | 2 ++ .../src/test/kotlin/SimpleWiremockRootTest.kt | 2 +- .../src/test/kotlin/test/AccRestTest.kt | 7 +++---- .../src/test/kotlin/test/action/v1/readAdV1.kt | 2 +- .../src/test/kotlin/test/action/v2/deleteAdV2.kt | 4 ++-- .../src/test/kotlin/test/action/v2/readAdV2.kt | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index fbd9589..758e4ac 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ !gradle/wrapper/gradle-wrapper.jar !**/src/**/build/ +**/.kotlin/ + /.idea/ /kotlin-js-store/ diff --git a/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/SimpleWiremockRootTest.kt b/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/SimpleWiremockRootTest.kt index a6c2cbb..0207b07 100644 --- a/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/SimpleWiremockRootTest.kt +++ b/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/SimpleWiremockRootTest.kt @@ -42,7 +42,7 @@ class SimpleWiremockRootTest : StringSpec({ DockerComposeContainer(File("docker-compose/docker-compose-wiremock.yml")).apply { withOptions("--compatibility") withExposedService(service, port) - withLocalCompose(true) +// withLocalCompose(true) } } diff --git a/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/AccRestTest.kt b/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/AccRestTest.kt index c76db1b..30c3182 100644 --- a/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/AccRestTest.kt +++ b/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/AccRestTest.kt @@ -1,12 +1,11 @@ package ru.otus.otuskotlin.marketplace.e2e.be.test import io.kotest.core.annotation.Ignored -import ru.otus.otuskotlin.marketplace.e2e.be.docker.WiremockDockerCompose -import ru.otus.otuskotlin.marketplace.e2e.be.fixture.BaseFunSpec import ru.otus.otuskotlin.marketplace.blackbox.fixture.docker.DockerCompose import ru.otus.otuskotlin.marketplace.e2e.be.docker.KtorJvmPGDockerCompose import ru.otus.otuskotlin.marketplace.e2e.be.docker.KtorLinuxPGDockerCompose -import ru.otus.otuskotlin.marketplace.e2e.be.docker.SpringDockerCompose +import ru.otus.otuskotlin.marketplace.e2e.be.docker.WiremockDockerCompose +import ru.otus.otuskotlin.marketplace.e2e.be.fixture.BaseFunSpec import ru.otus.otuskotlin.marketplace.e2e.be.fixture.client.RestClient import ru.otus.otuskotlin.marketplace.e2e.be.test.action.v1.toV1 import ru.otus.otuskotlin.marketplace.e2e.be.test.action.v2.toV2 @@ -31,6 +30,6 @@ open class AccRestTestBaseShort(dockerCompose: DockerCompose, debug: TestDebug = class AccRestWiremockTest : AccRestTestBaseFull(WiremockDockerCompose) -class AccRestSpringTest : AccRestTestBaseFull(SpringDockerCompose, debug = TestDebug.PROD) +//class AccRestSpringTest : AccRestTestBaseFull(SpringDockerCompose, debug = TestDebug.PROD) class AccRestKtorPgJvmTest : AccRestTestBaseFull(KtorJvmPGDockerCompose, debug = TestDebug.PROD) class AccRestKtorPgLinuxTest : AccRestTestBaseShort(KtorLinuxPGDockerCompose, debug = TestDebug.PROD) diff --git a/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v1/readAdV1.kt b/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v1/readAdV1.kt index cc26621..c0aaa67 100644 --- a/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v1/readAdV1.kt +++ b/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v1/readAdV1.kt @@ -5,8 +5,8 @@ import io.kotest.assertions.withClue import io.kotest.matchers.should import io.kotest.matchers.shouldNotBe import ru.otus.otuskotlin.marketplace.api.v1.models.* -import ru.otus.otuskotlin.marketplace.blackbox.test.action.beValidId import ru.otus.otuskotlin.marketplace.e2e.be.fixture.client.Client +import ru.otus.otuskotlin.marketplace.e2e.be.test.action.beValidId suspend fun Client.readAd(id: String?, debug: AdDebug = debugStubV1): AdResponseObject = readAd(id, debug = debug) { it should haveSuccessResult diff --git a/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v2/deleteAdV2.kt b/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v2/deleteAdV2.kt index 1882695..15f73d2 100644 --- a/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v2/deleteAdV2.kt +++ b/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v2/deleteAdV2.kt @@ -5,9 +5,9 @@ import io.kotest.assertions.withClue import io.kotest.matchers.should import io.kotest.matchers.shouldBe import ru.otus.otuskotlin.marketplace.api.v2.models.* -import ru.otus.otuskotlin.marketplace.blackbox.test.action.beValidId -import ru.otus.otuskotlin.marketplace.blackbox.test.action.beValidLock import ru.otus.otuskotlin.marketplace.e2e.be.fixture.client.Client +import ru.otus.otuskotlin.marketplace.e2e.be.test.action.beValidId +import ru.otus.otuskotlin.marketplace.e2e.be.test.action.beValidLock suspend fun Client.deleteAd(ad: AdResponseObject, debug: AdDebug = debugStubV2) { val id = ad.id diff --git a/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v2/readAdV2.kt b/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v2/readAdV2.kt index d72b79b..b7efb97 100644 --- a/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v2/readAdV2.kt +++ b/ok-marketplace-tests/ok-marketplace-e2e-be/src/test/kotlin/test/action/v2/readAdV2.kt @@ -5,8 +5,8 @@ import io.kotest.assertions.withClue import io.kotest.matchers.should import io.kotest.matchers.shouldNotBe import ru.otus.otuskotlin.marketplace.api.v2.models.* -import ru.otus.otuskotlin.marketplace.blackbox.test.action.beValidId import ru.otus.otuskotlin.marketplace.e2e.be.fixture.client.Client +import ru.otus.otuskotlin.marketplace.e2e.be.test.action.beValidId suspend fun Client.readAd(id: String?, debug: AdDebug = debugStubV2): AdResponseObject = readAd(id, debug = debug) { it should haveSuccessResult