@@ -32,6 +32,7 @@ import {
3232 getTestEnv ,
3333 initAllState ,
3434 makeMacro ,
35+ mockApiDetails ,
3536 mockBundleDownloadApi ,
3637 setupActionsVars ,
3738 setupTests ,
@@ -221,6 +222,7 @@ for (const {
221222
222223 await withTmpDir ( async ( tmpDir ) => {
223224 setupActionsVars ( tmpDir , tmpDir ) ;
225+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
224226 const source = await setupCodeql . getCodeQLSource (
225227 "linked" ,
226228 SAMPLE_DEFAULT_CLI_VERSION ,
@@ -255,6 +257,7 @@ test.serial(
255257
256258 await withTmpDir ( async ( tmpDir ) => {
257259 setupActionsVars ( tmpDir , tmpDir ) ;
260+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
258261 const source = await setupCodeql . getCodeQLSource (
259262 "latest" ,
260263 SAMPLE_DEFAULT_CLI_VERSION ,
@@ -298,6 +301,7 @@ test.serial(
298301
299302 await withTmpDir ( async ( tmpDir ) => {
300303 setupActionsVars ( tmpDir , tmpDir ) ;
304+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
301305 const result = await setupCodeql . setupCodeQLBundle (
302306 "linked" ,
303307 SAMPLE_DOTCOM_API_DETAILS ,
@@ -479,6 +483,7 @@ test.serial(
479483
480484 await withTmpDir ( async ( tmpDir ) => {
481485 setupActionsVars ( tmpDir , tmpDir , { GITHUB_EVENT_NAME : "dynamic" } ) ;
486+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
482487
483488 const source = await setupCodeql . getCodeQLSource (
484489 undefined ,
@@ -624,6 +629,7 @@ for (const toolsInput of ["nightly", "nightly-latest"]) {
624629
625630 await withTmpDir ( async ( tmpDir ) => {
626631 setupActionsVars ( tmpDir , tmpDir ) ;
632+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
627633 const source = await setupCodeql . getCodeQLSource (
628634 toolsInput ,
629635 SAMPLE_DEFAULT_CLI_VERSION ,
@@ -945,6 +951,7 @@ const toolcacheInputFallbackMacro = makeMacro({
945951
946952 await withTmpDir ( async ( tmpDir ) => {
947953 setupActionsVars ( tmpDir , tmpDir ) ;
954+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
948955
949956 for ( const [ k , v ] of Object . entries ( environment ) ) {
950957 process . env [ k ] = v ;
@@ -1165,6 +1172,7 @@ test.serial(
11651172
11661173 await withTmpDir ( async ( tmpDir ) => {
11671174 setupActionsVars ( tmpDir , tmpDir ) ;
1175+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
11681176 const source = await setupCodeql . getCodeQLSource (
11691177 undefined ,
11701178 PER_LANGUAGE_CLI_VERSION ,
@@ -1207,6 +1215,7 @@ test.serial(
12071215
12081216 await withTmpDir ( async ( tmpDir ) => {
12091217 setupActionsVars ( tmpDir , tmpDir ) ;
1218+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
12101219 for ( const { otherLanguagePacksReason, features } of [
12111220 // The per-language feature is disabled.
12121221 { otherLanguagePacksReason : undefined , features : createFeatures ( [ ] ) } ,
@@ -1286,6 +1295,7 @@ for (const fallback of [false, true]) {
12861295 setupActionsVars ( tmpDir , tmpDir , {
12871296 GITHUB_ACTION_REPOSITORY : "codeql-testing/action-fork" ,
12881297 } ) ;
1298+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
12891299 const result = await setupCodeql . setupCodeQLBundle (
12901300 undefined ,
12911301 SAMPLE_DOTCOM_API_DETAILS ,
@@ -1553,6 +1563,7 @@ for (const error of [
15531563
15541564 await withTmpDir ( async ( tmpDir ) => {
15551565 setupActionsVars ( tmpDir , tmpDir ) ;
1566+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
15561567 await t . throwsAsync (
15571568 setupCodeql . setupCodeQLBundle (
15581569 undefined ,
@@ -2259,6 +2270,7 @@ test.serial(
22592270 async ( t ) => {
22602271 await withTmpDir ( async ( tmpDir ) => {
22612272 setupActionsVars ( tmpDir , tmpDir ) ;
2273+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
22622274 delete process . env [ EnvVar . HAS_SET_UP_CODEQL ] ;
22632275
22642276 stubDownloadAndExtract ( ) ;
@@ -2294,6 +2306,7 @@ test.serial(
22942306
22952307 await withTmpDir ( async ( tmpDir ) => {
22962308 setupActionsVars ( tmpDir , tmpDir ) ;
2309+ mockApiDetails ( SAMPLE_DOTCOM_API_DETAILS ) ;
22972310 process . env [ ActionsEnvVars . RUNNER_ENVIRONMENT ] = "github-hosted" ;
22982311 delete process . env [ EnvVar . HAS_SET_UP_CODEQL ] ;
22992312 const staleDirectory = createToolcacheEntry (
0 commit comments