diff --git a/.run/Test Profile_ deployment.run.xml b/.run/Test Profile_ deployment.run.xml new file mode 100644 index 0000000000..413ecb756f --- /dev/null +++ b/.run/Test Profile_ deployment.run.xml @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/docs/01 - Contributing/A - Development Environment.md b/docs/01 - Contributing/A - Development Environment.md index ee9f873647..07b0db3c70 100644 --- a/docs/01 - Contributing/A - Development Environment.md +++ b/docs/01 - Contributing/A - Development Environment.md @@ -196,6 +196,7 @@ Several IntelliJ run configurations are provided to make it easier to run the pr - `Test Profile: auth-apikey-platform`: runs the tests with the auth-apikey-platform profile. - `Test Profile: auth-jwt-platform`: runs the tests with the auth-jwt-platform profile. - `Test Profile: host-docker-internal`: runs the tests with the host-docker-internal profile. +- `Test Profile: deployment`: runs all servers so that all SEPs can be tested using the demo wallet. - `Sep Server: default`: runs the SEP server locally with `default` profile. - `Stellar Observer: default`: runs the Stellar Observer locally with `default` profile. - `Platform Server: default`: runs the Platform server locally with `default` profile. @@ -216,6 +217,7 @@ the `service-runner/src/main/resources/profiles` folder. - `auth-jwt-custody`: starts the custody servers with the JWT authentication enabled. - `auth-apikey-platform`: starts the platform servers with the API key authentication enabled. - `auth-jwt-platform`: starts the platform servers with the JWT authentication enabled. +- `deployment`: starts all servers so that all SEPs can be tested using the demo wallet. ## Development Scenarios diff --git a/kotlin-reference-server/src/main/kotlin/org/stellar/reference/plugins/RequestLoggerPlugin.kt b/kotlin-reference-server/src/main/kotlin/org/stellar/reference/plugins/RequestLoggerPlugin.kt index 8a15b4a7c7..7697618133 100644 --- a/kotlin-reference-server/src/main/kotlin/org/stellar/reference/plugins/RequestLoggerPlugin.kt +++ b/kotlin-reference-server/src/main/kotlin/org/stellar/reference/plugins/RequestLoggerPlugin.kt @@ -14,10 +14,12 @@ val RequestLoggerPlugin = } onCallRespond { call -> - val onCallTime = call.attributes[onCallTimeKey] - val onCallReceiveTime = System.currentTimeMillis() - log.info( - "${call.request.httpMethod.value} ${call.request.local.uri} (${onCallReceiveTime - onCallTime}ms)" - ) + if (call.attributes.contains(onCallTimeKey)) { + val onCallTime = call.attributes[onCallTimeKey] + val onCallReceiveTime = System.currentTimeMillis() + log.info( + "${call.request.httpMethod.value} ${call.request.local.uri} (${onCallReceiveTime - onCallTime}ms)" + ) + } } } diff --git a/service-runner/src/main/resources/common/docker-compose.yaml b/service-runner/src/main/resources/common/docker-compose.yaml index f2efd46bac..aa3364d40c 100644 --- a/service-runner/src/main/resources/common/docker-compose.yaml +++ b/service-runner/src/main/resources/common/docker-compose.yaml @@ -40,6 +40,8 @@ services: - ../config:/config environment: KT_REFERENCE_SERVER_CONFIG: /config/reference-config.yaml + ports: + - "8091:8091" kafka: platform: linux/x86_64 diff --git a/service-runner/src/main/resources/docker-compose.yaml b/service-runner/src/main/resources/docker-compose.yaml index 028571cd5e..7e16d3a3dd 100644 --- a/service-runner/src/main/resources/docker-compose.yaml +++ b/service-runner/src/main/resources/docker-compose.yaml @@ -4,8 +4,8 @@ services: file: common/docker-compose.yaml service: platform env_file: - - profiles/${TEST_PROFILE_NAME:-default}/config.env - - profiles/${TEST_PROFILE_NAME:-default}/test.env + - profiles/${TEST_PROFILE_NAME:-deployment}/config.env + - profiles/${TEST_PROFILE_NAME:-deployment}/test.env depends_on: - db - kafka @@ -17,8 +17,8 @@ services: file: common/docker-compose.yaml service: observer env_file: - - profiles/${TEST_PROFILE_NAME:-default}/config.env - - profiles/${TEST_PROFILE_NAME:-default}/test.env + - profiles/${TEST_PROFILE_NAME:-deployment}/config.env + - profiles/${TEST_PROFILE_NAME:-deployment}/test.env depends_on: - db - kafka diff --git a/service-runner/src/main/resources/profiles/deployment/config.env b/service-runner/src/main/resources/profiles/deployment/config.env new file mode 100644 index 0000000000..d8727c6ac4 --- /dev/null +++ b/service-runner/src/main/resources/profiles/deployment/config.env @@ -0,0 +1 @@ +sep24.interactive_url.base_url=http://localhost:3000 \ No newline at end of file diff --git a/service-runner/src/main/resources/profiles/deployment/test.env b/service-runner/src/main/resources/profiles/deployment/test.env new file mode 100644 index 0000000000..e69de29bb2