mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Our OCI credentials policy layer expects to be provided with an implementation of the Docker credential helper protocol as part of its "credentials lookup environment". Since we're already using ORAS-Go for everything else we'll just wrap their implementation of this protocol here too, and then translate the result into our own type since we've been intentionally avoiding making ORAS-Go types part of any of our exported package APIs. Because this is the concrete implementation of an interface we introduced so that unit tests elsewhere could fake it, it's pretty awkward to fully test this implementation without the overhead of having a test build its own credential helper executable dynamically to run on the platform where the test program is running. ORAS-Go already has its own tests for this functionality, so as a pragmatic compromise here we just focus on testing that we're attempting to run the executable that the protocol expects us to execute, but detecting that through an error result rather than through a success result. Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
1.9 KiB
1.9 KiB