mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 05:30:16 +08:00
Use the API URL from the environment if it is present.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user