test: update key in tests

This commit is contained in:
Zxilly 2024-07-25 16:50:04 +08:00
parent 13a76d3742
commit 8f55f6c3be
No known key found for this signature in database
GPG Key ID: 47AB1DEC841BC6A2
2 changed files with 6 additions and 2 deletions

View File

@ -50,7 +50,7 @@ describe('cache-restore tests', () => {
await restoreCache(lockFilePattern);
const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-hash`;
const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-${process.arch}-hash`;
expect(jest.mocked(core.saveState)).toHaveBeenCalledWith(
'CACHE_KEY',
expectedKey
@ -66,7 +66,7 @@ describe('cache-restore tests', () => {
});
it('calls core.saveState("CACHE_RESULT") when cache.restoreCache() returns key', async () => {
const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-hash`;
const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-${process.arch}-hash`;
jest.mocked(glob.hashFiles).mockResolvedValue('hash');
jest.mocked(cache.restoreCache).mockResolvedValue(expectedKey);

View File

@ -327,6 +327,10 @@ get_machine_architecture() {
echo "loongarch64"
return 0
;;
riscv64)
echo "riscv64"
return 0
;;
esac
fi