mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 09:14:58 +00:00
Add and use getProxyFilename
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import * as filepath from "path";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
import * as toolcache from "@actions/tool-cache";
|
||||
import test, { ExecutionContext } from "ava";
|
||||
@@ -484,7 +486,10 @@ test("getProxyBinaryPath - returns path from tool cache if available", async (t)
|
||||
const path = await startProxyExports.getProxyBinaryPath(logger);
|
||||
|
||||
t.assert(path);
|
||||
t.assert(path.startsWith(toolcachePath));
|
||||
t.is(
|
||||
path,
|
||||
filepath.join(toolcachePath, startProxyExports.getProxyFilename()),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -525,6 +530,9 @@ test("getProxyBinaryPath - downloads proxy if not in cache", async (t) => {
|
||||
t.assert(cacheDir.calledOnceWith(extractedPath));
|
||||
|
||||
t.assert(path);
|
||||
t.assert(path.startsWith(toolcachePath));
|
||||
t.is(
|
||||
path,
|
||||
filepath.join(toolcachePath, startProxyExports.getProxyFilename()),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user