Skip to content

Commit 749a163

Browse files
test: add Amazon Q endpoint override via environment variable (#5501)
Add __CODEWHISPERER_ENDPOINT environment variable support to override endpoint during testing. Falls back to registry value if not set. This environment variable is consistent with VS Code implementation.
1 parent e534cac commit 749a163

File tree

1 file changed

+1
-1
lines changed
  • plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util

1 file changed

+1
-1
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/CodeWhispererConstants.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ object CodeWhispererConstants {
155155

156156
object Config {
157157
val CODEWHISPERER_ENDPOINT
158-
get() = Registry.get("amazon.q.endpoint").asString()
158+
get() = System.getenv("__CODEWHISPERER_ENDPOINT") ?: Registry.get("amazon.q.endpoint").asString()
159159

160160
const val CODEWHISPERER_IDPOOL_ID = "us-east-1:70717e99-906f-4add-908c-bd9074a2f5b9"
161161
val Sigv4ClientRegion = Region.US_EAST_1

0 commit comments

Comments
 (0)