ddiss / icyci

Safe and scalable continuous testing, without the bloat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reuse gpg keychain between tests

ddiss opened this issue · comments

We currently call gpgInit() -> gpg --gen-key ... in each test. Doing so is slow and wastes host entropy.
We should be able to do this as part of a global func init() in icyci_test.go. It would likely also make sense to move .gitconfig initialisation into the same function.

I've implemented this via the linked commit. With go there only appears to be a file level constructor (no destructor), so the key is retained in memory after generation in init(). Tests subsequently use the in-memory key via gpg --import.