sigstore/policy-controller

Add testdata generator for trustroot reconciler tests

codysoyland opened this issue · 1 comments

Description

The test data in pkg/reconciler/trustroot/trustroot_test.go needs to be updated whenever the serialized output of SigstoreKeys is changed or the TUF repo expires (every six months). The comments indicate that the data is generated by creating a test cluster with scaffolding and manually copying values from the test cluster.

Ideally, test data can be regenerated with a script, as this will allow for easier maintenance, and variations on the test data can be easily added. This is also important for adding support for trusted_root.json, which requires a new TUF target, which scaffolding currently does not support.

Thanks @codysoyland. It sounds good to me. We had to manually update these values which wasn't ideal.