@@ -707,7 +707,9 @@ Test workflow with GITHUB_COPILOT_BASE_URL in engine.env.
707707 // The copilot API target should be derived from the env var and present in the
708708 // AWF JSON config (apiProxy.targets.copilot.host) rather than as a --copilot-api-target
709709 // CLI flag, since network/proxy settings are now expressed via --config JSON file.
710- if ! strings .Contains (lockStr , `"copilot":{"host":"copilot-proxy.corp.example.com"}` ) {
710+ copilotHostUnescaped := `"copilot":{"host":"copilot-proxy.corp.example.com"}`
711+ copilotHostEscaped := `\"copilot\":{\"host\":\"copilot-proxy.corp.example.com\"}`
712+ if ! strings .Contains (lockStr , copilotHostUnescaped ) && ! strings .Contains (lockStr , copilotHostEscaped ) {
711713 t .Error ("Expected copilot API target to be derived from GITHUB_COPILOT_BASE_URL in AWF config JSON" )
712714 }
713715
@@ -716,7 +718,12 @@ Test workflow with GITHUB_COPILOT_BASE_URL in engine.env.
716718 // We search for the allowDomains key followed by its opening "[" and verify the hostname
717719 // appears before the closing "]" of that specific array.
718720 allowDomainsPrefix := `"allowDomains":[`
721+ allowDomainsPrefixEscaped := `\"allowDomains\":[`
719722 allowDomainsIdx := strings .Index (lockStr , allowDomainsPrefix )
723+ if allowDomainsIdx < 0 {
724+ allowDomainsPrefix = allowDomainsPrefixEscaped
725+ allowDomainsIdx = strings .Index (lockStr , allowDomainsPrefixEscaped )
726+ }
720727 if allowDomainsIdx < 0 {
721728 t .Fatal ("allowDomains key not found in compiled lock file" )
722729 }
0 commit comments