mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 18:06:45 +00:00
changed gpg import to run in key directory
This commit is contained in:
parent
14d3f1d12c
commit
01f7e3b3fd
3 changed files with 13 additions and 9 deletions
|
@ -23,7 +23,7 @@ const env = process.env;
|
|||
const m2Dir = path.join(__dirname, auth.M2_DIR);
|
||||
const settingsFile = path.join(m2Dir, auth.SETTINGS_FILE);
|
||||
const gpgDir = path.join(__dirname, auth.GPG_DIR);
|
||||
const gpgFile = path.join(gpgDir, auth.GPG_FILE);
|
||||
const gpgFile = auth.GPG_FILE;
|
||||
|
||||
describe('auth tests', () => {
|
||||
beforeEach(async () => {
|
||||
|
@ -180,7 +180,11 @@ describe('auth tests', () => {
|
|||
|
||||
await auth.configAuthentication(id, username, password, gpgPrivateKey);
|
||||
|
||||
expect(exec.exec).toHaveBeenCalledWith(`gpg --import --batch ${gpgFile}`);
|
||||
expect(exec.exec).toHaveBeenCalledWith(
|
||||
'gpg',
|
||||
['--import', '--batch', gpgFile],
|
||||
{cwd: gpgDir}
|
||||
);
|
||||
|
||||
expect(fs.existsSync(gpgDir)).toBe(false);
|
||||
}, 100000);
|
||||
|
@ -193,7 +197,9 @@ describe('auth tests', () => {
|
|||
await auth.configAuthentication(id, username, password);
|
||||
|
||||
expect(exec.exec).not.toHaveBeenCalledWith(
|
||||
`gpg --import --batch ${gpgFile}`
|
||||
'gpg',
|
||||
['--import', '--batch', gpgFile],
|
||||
{cwd: gpgDir}
|
||||
);
|
||||
|
||||
expect(fs.existsSync(gpgDir)).toBe(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue