Skip to content

Commit

Permalink
fixed test name, duplicated versions, variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
anilcan.gul committed Jan 8, 2025
1 parent bb419f2 commit 10ac370
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 18 deletions.
2 changes: 0 additions & 2 deletions examples/micronaut-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@file:Suppress("UnstableApiUsage", "DSL_SCOPE_VIOLATION")

plugins {
kotlin("jvm") version libs.versions.kotlin
id("org.jetbrains.kotlin.plugin.allopen") version libs.versions.kotlin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SupplierHttpService(
) : SupplierService {
override suspend fun getSupplierPermission(supplierId: Long): SupplierPermission? = try {
val response = supplierHttpClient.getSupplierPermission(supplierId)
println("API Response: $response") // Yanıtı konsola yazdır
println("API Response: $response")
response
} catch (e: WebSocketClientException) {
println("Error fetching supplier permission: ${e.message}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import io.kotest.matchers.string.shouldContain
import stove.micronaut.example.application.domain.Product
import stove.micronaut.example.application.services.SupplierPermission
import stove.micronaut.example.infrastructure.api.model.request.CreateProductRequest
import java.util.*

class ProductControllerTest :
FunSpec({
Expand All @@ -26,9 +27,9 @@ class ProductControllerTest :
}
}

test("should create a product in Couchbase when a product is created") {
val id = "RANDOM0001"
val request = CreateProductRequest(id = id, name = "Deneme", supplierId = 120688)
test("should save product to Couchbase when product creation request is sent") {
val id = UUID.randomUUID().toString()
val request = CreateProductRequest(id = id, name = "product name", supplierId = 120688)
val supplierMock = SupplierPermission(id = 120688, isBlacklisted = false)

TestSystem.validate {
Expand All @@ -43,7 +44,7 @@ class ProductControllerTest :
http {
postAndExpectJson<Product>("/products/create", body = request.some()) { actual ->
actual.supplierId shouldBe 120688
actual.name shouldBe "Deneme"
actual.name shouldBe "product name"
}
}
couchbase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import com.trendyol.stove.testing.e2e.system.TestSystem
import com.trendyol.stove.testing.e2e.wiremock.*
import io.kotest.core.config.AbstractProjectConfig
import org.slf4j.*
import stove.micronaut.example.infrastructure.couchbase.ObjectMapperConfig

class TestSystemConfig : AbstractProjectConfig() {
class Stove : AbstractProjectConfig() {
private val logger: Logger = LoggerFactory.getLogger("WireMockMonitor")

@Suppress("LongMethod")
Expand Down Expand Up @@ -54,7 +53,7 @@ class TestSystemConfig : AbstractProjectConfig() {
withParameters = listOf(
"server.port=8080",
"logging.level.root=info",
"logging.level.org.springframework.web=info"
"logging.level.org.micronaut.web=info"
)
)
}.run()
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
kotest.framework.config.fqn=com.stove.micronaut.example.e2e.TestSystemConfig
kotest.framework.config.fqn=com.stove.micronaut.example.e2e.Stove
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ micronaut-inject = { module = "io.micronaut:micronaut-inject", version.ref = "mi
micronaut-core = { module = "io.micronaut:micronaut-core", version.ref = "micronaut" }
micronaut-micrometer-core = { module = "io.micronaut.configuration:micronaut-micrometer-core", version.ref = "micronaut-micrometer" }
kafka-clients = { module = "org.apache.kafka:kafka-clients", version.ref = "kafka-clients" }
micronaut-test-kotest = { module = "io.micronaut.test:micronaut-test-kotest5", version = "4.0.0"}
micronaut-test-kotest = { module = "io.micronaut.test:micronaut-test-kotest5", version = "4.0.0" }


# Arrow
Expand Down Expand Up @@ -275,5 +275,5 @@ protobuf = { id = "com.google.protobuf", version = "0.9.4" }
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinBinaryCompatibilityValidator" }
google-ksp = { id = "com.google.devtools.ksp", version = "2.1.0-1.0.29" }
micronaut-application = { id = "io.micronaut.application", version = "4.4.3" }
micronaut-aot = { id = "io.micronaut.aot", version = "4.4.3" }
micronaut-application = { id = "io.micronaut.application", version.ref = "micronaut" }
micronaut-aot = { id = "io.micronaut.aot", version.ref = "micronaut" }
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ dependencies {
testImplementation(libs.kotest.runner.junit5)
}

repositories {
mavenCentral()
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
}

0 comments on commit 10ac370

Please sign in to comment.