@@ -13,9 +13,7 @@ import { MockGitHubApiServer } from "../../../../src/mocks/mock-gh-api-server";
1313import { response } from "../../../../src/mocks/scenarios/problem-query-success/0-getRepo.json" ;
1414import { response as variantAnalysisJson_response } from "../../../../src/mocks/scenarios/problem-query-success/1-submitVariantAnalysis.json" ;
1515import { response as variantAnalysisRepoJson_response } from "../../../../src/mocks/scenarios/problem-query-success/9-getVariantAnalysisRepo.json" ;
16- import { testCredentialsWithUnauthenticatedOctokit } from "../../../factories/authentication" ;
17-
18- const mockCredentials = testCredentialsWithUnauthenticatedOctokit ( ) ;
16+ import { testCredentialsWithRealOctokit } from "../../../factories/authentication" ;
1917
2018const mockServer = new MockGitHubApiServer ( ) ;
2119beforeAll ( ( ) => mockServer . startServer ( ) ) ;
@@ -31,7 +29,7 @@ describe("submitVariantAnalysis", () => {
3129 await mockServer . loadScenario ( "problem-query-success" ) ;
3230
3331 const result = await submitVariantAnalysis (
34- mockCredentials ,
32+ testCredentialsWithRealOctokit ( ) ,
3533 createMockSubmission ( ) ,
3634 ) ;
3735
@@ -45,7 +43,7 @@ describe("getVariantAnalysis", () => {
4543 await mockServer . loadScenario ( "problem-query-success" ) ;
4644
4745 const result = await getVariantAnalysis (
48- mockCredentials ,
46+ testCredentialsWithRealOctokit ( ) ,
4947 controllerRepoId ,
5048 variantAnalysisId ,
5149 ) ;
@@ -60,7 +58,7 @@ describe("getVariantAnalysisRepo", () => {
6058 await mockServer . loadScenario ( "problem-query-success" ) ;
6159
6260 const result = await getVariantAnalysisRepo (
63- mockCredentials ,
61+ testCredentialsWithRealOctokit ( ) ,
6462 controllerRepoId ,
6563 variantAnalysisId ,
6664 repoTaskId ,
@@ -76,7 +74,7 @@ describe("getVariantAnalysisRepoResult", () => {
7674 await mockServer . loadScenario ( "problem-query-success" ) ;
7775
7876 const result = await getVariantAnalysisRepoResult (
79- mockCredentials ,
77+ testCredentialsWithRealOctokit ( ) ,
8078 `https://objects-origin.githubusercontent.com/codeql-query-console/codeql-variant-analysis-repo-tasks/${ variantAnalysisId } /${ repoTaskId } /${ faker . datatype . uuid ( ) } ` ,
8179 ) ;
8280
@@ -93,7 +91,7 @@ describe("getRepositoryFromNwo", () => {
9391 await mockServer . loadScenario ( "problem-query-success" ) ;
9492
9593 const result = await getRepositoryFromNwo (
96- mockCredentials ,
94+ testCredentialsWithRealOctokit ( ) ,
9795 "github" ,
9896 "mrva-demo-controller-repo" ,
9997 ) ;
0 commit comments