From 19d6bf6e6ffaab7f3997be8f36f975ba1188cdb5 Mon Sep 17 00:00:00 2001 From: oaljarrah Date: Wed, 4 Sep 2024 00:24:18 +0300 Subject: [PATCH] chore: test --- .github/workflows/selfserve-service-mock.yaml | 2 +- .../sdk/test/contract/extension/File.kt | 13 ++++++++++--- .../templates/expediagroup-sdk/main.mustache | 2 +- .../templates/expediagroup-sdk/pom.mustache | 11 ++--------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/selfserve-service-mock.yaml b/.github/workflows/selfserve-service-mock.yaml index a918d13d9..2da58f9dc 100644 --- a/.github/workflows/selfserve-service-mock.yaml +++ b/.github/workflows/selfserve-service-mock.yaml @@ -61,7 +61,7 @@ jobs: run: npx --yes -p @expediagroup/spec-transformer cli -i ${{ env.spec }} -o ${{ env.spec }} -to - name: Run Mock Server working-directory: specs - run: java -jar specmatic.jar stub ${{ env.spec }} --port 8090 & disown + run: java -jar specmatic.jar stub ${{ env.spec }} --port 8080 & disown - name: Wait for Mock Server to Start run: sleep 10 - name: Verify Server is Running diff --git a/sdk-test/src/main/kotlin/com/expediagroup/sdk/test/contract/extension/File.kt b/sdk-test/src/main/kotlin/com/expediagroup/sdk/test/contract/extension/File.kt index fee15a151..41332b001 100644 --- a/sdk-test/src/main/kotlin/com/expediagroup/sdk/test/contract/extension/File.kt +++ b/sdk-test/src/main/kotlin/com/expediagroup/sdk/test/contract/extension/File.kt @@ -15,8 +15,14 @@ */ package com.expediagroup.sdk.test.contract.extension +import io.specmatic.conversions.EnvironmentAndPropertiesConfiguration import io.specmatic.conversions.OpenApiSpecification -import io.specmatic.core.* +import io.specmatic.core.Feature +import io.specmatic.core.Hook +import io.specmatic.core.OPENAPI_FILE_EXTENSIONS +import io.specmatic.core.PassThroughHook +import io.specmatic.core.SecurityConfiguration +import io.specmatic.core.unsupportedFileExtensionContractException import java.io.File /** @@ -28,6 +34,7 @@ import java.io.File * @param sourceRepositoryBranch optional branch of source repository. * @param specificationPath optional path to the specification file. * @param securityConfiguration optional security configuration. + * @param environmentAndPropertiesConfiguration configuration for environment and properties, default is EnvironmentAndPropertiesConfiguration. * @throws unsupportedFileExtensionContractException if the file extension is not supported. * @return converted Feature object. */ @@ -38,7 +45,7 @@ fun File.toSpecmaticFeature( sourceRepositoryBranch: String? = null, specificationPath: String? = null, securityConfiguration: SecurityConfiguration? = null, - specmaticConfig: SpecmaticConfig = SpecmaticConfig() + environmentAndPropertiesConfiguration: EnvironmentAndPropertiesConfiguration = EnvironmentAndPropertiesConfiguration() ): Feature = when (extension) { in OPENAPI_FILE_EXTENSIONS -> @@ -50,7 +57,7 @@ fun File.toSpecmaticFeature( sourceRepositoryBranch = sourceRepositoryBranch, specificationPath = specificationPath, securityConfiguration = securityConfiguration, - specmaticConfig = specmaticConfig + environmentAndPropertiesConfiguration = environmentAndPropertiesConfiguration ).toFeature() else -> throw unsupportedFileExtensionContractException(path, extension) diff --git a/sdk-test/src/main/resources/templates/expediagroup-sdk/main.mustache b/sdk-test/src/main/resources/templates/expediagroup-sdk/main.mustache index 98f7216c3..c8520bd6a 100644 --- a/sdk-test/src/main/resources/templates/expediagroup-sdk/main.mustache +++ b/sdk-test/src/main/resources/templates/expediagroup-sdk/main.mustache @@ -27,4 +27,4 @@ class Main { } } } -} \ No newline at end of file +} diff --git a/sdk-test/src/main/resources/templates/expediagroup-sdk/pom.mustache b/sdk-test/src/main/resources/templates/expediagroup-sdk/pom.mustache index fa53e7dbc..886a97100 100644 --- a/sdk-test/src/main/resources/templates/expediagroup-sdk/pom.mustache +++ b/sdk-test/src/main/resources/templates/expediagroup-sdk/pom.mustache @@ -7,12 +7,6 @@ Rapid Java SDK Tests Expedia Group Rapid Java SDK Tests - - org.springframework.boot - spring-boot-starter-parent - 3.3.3 - - 1.8 1.8 @@ -110,8 +104,7 @@ maven-compiler-plugin 3.8.1 - - 1.8 + 1.8 1.8 @@ -146,4 +139,4 @@ - + \ No newline at end of file