fix: sql guard gaps, date tz, timeouts, payload

This commit is contained in:
smartass
2026-06-12 01:37:15 +05:00
parent 783e5bc5b9
commit 1fecb1cce4
14 changed files with 237 additions and 10 deletions
+17
View File
@@ -109,6 +109,23 @@ describe('buildSshAuth', () => {
expect(auth).toEqual({ agent: '/tmp/agent.sock' })
})
it('throws when agent is requested but SSH_AUTH_SOCK is unset', () => {
expect(() => buildSshAuth(sshConfig({ agent: true, password: 'pw' }), {})).toThrow(
/SSH_AUTH_SOCK is not set/
)
})
it('throws when agent is requested but SSH_AUTH_SOCK is empty', () => {
expect(() => buildSshAuth(sshConfig({ agent: true }), { SSH_AUTH_SOCK: '' })).toThrow(
/SSH_AUTH_SOCK is not set/
)
})
it('still prefers privateKey over a requested agent', () => {
const auth = buildSshAuth(sshConfig({ agent: true, privateKey: 'PEM' }), {})
expect(auth).toEqual({ privateKey: 'PEM', passphrase: undefined })
})
it('falls back to password', () => {
expect(buildSshAuth(sshConfig({ password: 'pw' }))).toEqual({ password: 'pw' })
})