Use the API URL from the environment if it is present.

This commit is contained in:
Chris Gavin
2022-08-10 21:11:50 +01:00
parent a6d09016e7
commit bbdc9efa94
42 changed files with 122 additions and 22 deletions

View File

@@ -87,6 +87,23 @@ test("Get the client API with github url", async (t) => {
);
});
test("Get the API with an API URL directly", async (t) => {
doTest(
t,
{
auth: "xyz",
url: "http://github.localhost",
apiURL: "http://api.github.localhost",
},
undefined,
{
auth: "token xyz",
baseUrl: "http://api.github.localhost",
userAgent: `CodeQL-Action/${pkg.version}`,
}
);
});
function doTest(
t: ExecutionContext<unknown>,
clientArgs: any,