Skip to content

Commit 9b2219e

Browse files
committed
test: Refactor test utilities
- Add `test-utils` module to streamline test cases - Rename module `kotlin-sdk-test` -> `integration-test` - Move test utilities for managing processes, ports, and TypeScript execution logic
1 parent 6fee82f commit 9b2219e

88 files changed

Lines changed: 253 additions & 50 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies {
1212
kover(project(":kotlin-sdk-core"))
1313
kover(project(":kotlin-sdk-client"))
1414
kover(project(":kotlin-sdk-server"))
15-
kover(project(":kotlin-sdk-test"))
15+
"kover"(project(":integration-test"))
1616
}
1717

1818
subprojects {

conformance-test/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ plugins {
77
dependencies {
88
testImplementation(project(":kotlin-sdk"))
99
testImplementation(kotlin("test"))
10+
testImplementation(project(":test-utils"))
1011
testImplementation(libs.kotlin.logging)
1112
testImplementation(libs.ktor.client.cio)
1213
testImplementation(libs.ktor.server.cio)

conformance-test/src/test/kotlin/io/modelcontextprotocol/kotlin/sdk/conformance/ConformanceTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class ConformanceTest {
274274

275275
val processBuilder = ProcessBuilder(
276276
"npx",
277-
"@modelcontextprotocol/conformance",
277+
"@modelcontextprotocol/conformance@0.1.8",
278278
"client",
279279
"--command",
280280
clientCommand.joinToString(" "),
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ kotlin {
2525
}
2626
jvmTest {
2727
dependencies {
28-
implementation(libs.awaitility)
29-
implementation(libs.junit.jupiter.params)
30-
runtimeOnly(libs.slf4j.simple)
28+
implementation(project(":test-utils"))
3129
}
3230
}
3331
}

kotlin-sdk-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/ClientTest.kt renamed to integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/ClientTest.kt

File renamed without changes.

kotlin-sdk-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/OldSchemaClientTest.kt renamed to integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/OldSchemaClientTest.kt

File renamed without changes.

kotlin-sdk-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/OldSchemaSseTransportTest.kt renamed to integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/OldSchemaSseTransportTest.kt

File renamed without changes.

kotlin-sdk-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/SseTransportTest.kt renamed to integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/SseTransportTest.kt

File renamed without changes.

kotlin-sdk-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/WebSocketTransportTest.kt renamed to integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/WebSocketTransportTest.kt

File renamed without changes.

kotlin-sdk-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/InMemoryTransportTest.kt renamed to integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/InMemoryTransportTest.kt

File renamed without changes.

0 commit comments

Comments
 (0)