@@ -8,6 +8,7 @@ import sinon from "sinon";
88import * as apiClient from "./api-client" ;
99import * as defaults from "./defaults.json" ;
1010import { setUpFeatureFlagTests } from "./feature-flags/testing-util" ;
11+ import { makeFromSchema } from "./json/testing-util" ;
1112import { BuiltInLanguage } from "./languages" ;
1213import { getRunnerLogger , Logger } from "./logging" ;
1314import * as startProxyExports from "./start-proxy" ;
@@ -457,23 +458,13 @@ test("getCredentials throws an error when non-printable characters are used for
457458} ) ;
458459
459460test ( "getCredentials accepts OIDC configurations" , ( t ) => {
460- const oidcConfigurations = [
461- {
461+ const oidcConfigurations = startProxyExports . oidcSchemas . map (
462+ ( schemaInfo ) => ( {
462463 type : "nuget_feed" ,
463- host : "azure.pkg.github.com" ,
464- ...validAzureCredential ,
465- } ,
466- {
467- type : "nuget_feed" ,
468- host : "aws.pkg.github.com" ,
469- ...validAwsCredential ,
470- } ,
471- {
472- type : "nuget_feed" ,
473- host : "jfrog.pkg.github.com" ,
474- ...validJFrogCredential ,
475- } ,
476- ] ;
464+ host : `${ schemaInfo . name . toLowerCase ( ) } .pkg.github.com` ,
465+ ...makeFromSchema ( true , schemaInfo . schema ) ,
466+ } ) ,
467+ ) ;
477468
478469 const credentials = startProxyExports . getCredentials (
479470 getRunnerLogger ( true ) ,
0 commit comments