mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-05-02 16:29:54 +02:00
Unit test getCacheVersion
This commit is contained in:
parent
820f06f7d0
commit
bd756c16ae
4 changed files with 49 additions and 10 deletions
7
dist/restore/index.js
vendored
7
dist/restore/index.js
vendored
|
@ -2237,9 +2237,9 @@ function createHttpClient() {
|
|||
function getCacheVersion() {
|
||||
// Add salt to cache version to support breaking changes in cache entry
|
||||
const components = [
|
||||
core.getInput(constants_1.Inputs.Key),
|
||||
core.getInput(constants_1.Inputs.RestoreKeys),
|
||||
core.getInput(constants_1.Inputs.Path),
|
||||
core.getInput(constants_1.Inputs.Key, { required: true }),
|
||||
core.getInput(constants_1.Inputs.RestoreKeys, { required: false }),
|
||||
core.getInput(constants_1.Inputs.Path, { required: true }),
|
||||
versionSalt
|
||||
];
|
||||
return crypto
|
||||
|
@ -2247,6 +2247,7 @@ function getCacheVersion() {
|
|||
.update(components.join("|"))
|
||||
.digest("hex");
|
||||
}
|
||||
exports.getCacheVersion = getCacheVersion;
|
||||
function getCacheEntry() {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue