ddiss / icyci

Safe and scalable continuous testing, without the bloat
GNU Affero General Public License v3.0
2 stars 1 forks source link

reuse gpg keychain between tests #6

Closed ddiss closed 1 year ago

ddiss commented 1 year ago

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.

ddiss commented 1 year ago

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.