Skip to content

Commit 91d457a

Browse files
fix: add the relative import paths
1 parent cc389eb commit 91d457a

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ dependencies {
4444
compileOnly 'jakarta.annotation:jakarta.annotation-api:1.3.5' // Java 9+ compatibility - Do NOT update to 2.0.0
4545

4646
testImplementation 'org.springframework.boot:spring-boot-starter-test'
47-
testImplementation 'io.specmatic.grpc:specmatic-grpc:0.1.12'
47+
testImplementation 'io.specmatic.grpc:specmatic-grpc:0.1.14'
4848
testImplementation "org.testcontainers:junit-jupiter:1.21.3"
4949
}
5050

5151
sourceSets {
5252
main {
5353
proto {
54-
srcDir 'specmatic-order-contracts/io/specmatic/examples/store/grpc/order_api'
54+
srcDir 'specmatic-order-contracts/io/specmatic/examples/store/grpc'
5555
}
5656
}
5757
}

specmatic-order-contracts

src/test/kotlin/com/store/specmatic_order_api_grpc/ContractTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.store.specmatic_order_api_grpc
22

33
import io.specmatic.grpc.EXAMPLES_DIR
44
import io.specmatic.grpc.HOST
5+
import io.specmatic.grpc.IMPORT_PATHS
56
import io.specmatic.grpc.PORT
67
import io.specmatic.grpc.junit.SpecmaticGrpcContractTest
78
import org.junit.jupiter.api.BeforeAll
@@ -19,6 +20,8 @@ class ContractTest : SpecmaticGrpcContractTest {
1920
System.setProperty(PORT, "9090")
2021
System.setProperty(EXAMPLES_DIR, "src/test/resources/specmatic")
2122
System.setProperty(SPECMATIC_GENERATIVE_TESTS, "true")
23+
// This path is relative to the specified proto file in specmatic config file
24+
System.setProperty(IMPORT_PATHS, "../")
2225
System.setProperty(PROTOC_VERSION, "3.23.4")
2326
}
2427
}

src/test/kotlin/com/store/specmatic_order_api_grpc/ContractTestUsingTestContainer.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class ContractTestUsingTestContainer {
2727
"--port=9090",
2828
"--examples=./src/test/resources/specmatic",
2929
"--protoc-version=3.23.4",
30+
"--import-path=../"
3031
).withEnv(SPECMATIC_GENERATIVE_TESTS, "true")
3132
.withFileSystemBind(
3233
"./src/test/resources/specmatic",

0 commit comments

Comments
 (0)