mozilla-services / mozilla-services/autograph

switch signers to use io.FS abstraction

Open
#787 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code quality
Dominant language
Go
Stars
176
Forks
34
Avg merge
1d 17h
Merged PRs (30d)
3

Description

AJ asked in https://github.com/mozilla-services/autograph/pull/782#discussion_r724413533:

Is there verification of os.RemoveAll() running successfully within SignFiles?

and we don't test the side effects of signers that read and write to disk and S3.

It's important to test this to ensure the correctness of the apk2 and gpg2 signers that shell out and the contentsignaturepki signer that writes to S3.

Switching the signers to take generic reader and writer clients and operate on an io.FS implementation might make this easier. For example by embedding an input test fixture FS then diffing it against the output FS or recording operations on a mock FS implementation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the apk2, gpg2, and contentsignaturepki signers, focusing on their disk and S3 side effects. Compare the current operations with the io.FS, embed.FS, and mock-FS approaches described in the issue. Done means signer behavior is tested, including whether os.RemoveAll succeeds and whether expected output operations occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.