Skip to content

Commit 32d4b42

Browse files
committed
explicit gpgbinpath in tests
1 parent 6591d5a commit 32d4b42

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tests/crypto/gpg.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ gpg: pinentry launched
162162
Inappropriate ioctl for device`,
163163
});
164164

165-
const gpg = new GpgWrapper({ pinentryMode: 'loopback' as any });
165+
const gpg = new GpgWrapper({
166+
pinentryMode: 'loopback',
167+
binaryPathOverride: '/usr/bin/gpg'
168+
});
166169
const res = await gpg.encryptFile({
167170
inputPath: 'in.csv',
168171
outputPath: 'out.gpg',
@@ -184,6 +187,7 @@ Inappropriate ioctl for device`,
184187
armor: true,
185188
trustAlways: true,
186189
pinentryMode: 'loopback' as any,
190+
binaryPathOverride: '/usr/bin/gpg',
187191
});
188192
const res = await gpg.encryptFile({
189193
inputPath: 'in.csv',
@@ -211,7 +215,7 @@ Inappropriate ioctl for device`,
211215
status: null, signal: null, error: Object.assign(new Error('ETIMEDOUT'), { code: 'ETIMEDOUT' })
212216
} as any);
213217

214-
const gpg = new GpgWrapper();
218+
const gpg = new GpgWrapper({ binaryPathOverride: '/usr/bin/gpg' });
215219
const res = await gpg.encryptFile({ inputPath: 'in.csv', outputPath: 'out.gpg', recipient: 'RECIP' });
216220
expect(res.success).toBe(false);
217221
if (!res.success) expect(res.error).toMatch(/timed out/i);
@@ -223,7 +227,7 @@ Inappropriate ioctl for device`,
223227
status: null, signal: null, error: Object.assign(new Error('qwerty'), { code: 'qwerty' })
224228
} as any);
225229

226-
const gpg = new GpgWrapper();
230+
const gpg = new GpgWrapper({ binaryPathOverride: '/usr/bin/gpg' });
227231
const res = await gpg.encryptFile({ inputPath: 'in.csv', outputPath: 'out.gpg', recipient: 'RECIP' });
228232
expect(res.success).toBe(false);
229233
if (!res.success) expect(res.error).toMatch(/terminated without an exit status/i);

0 commit comments

Comments
 (0)