Documentation
¶
Overview ¶
Package fakes3 is an in-process S3-compatible endpoint for Podium's own tests.
It exists so the suite needs no object store container at all, and because a fake that ignores authentication would make every presigned-URL test worthless: a URL that is accepted no matter what it is signed with proves nothing about signing. So the object semantics come from gofakes3, which speaks enough of the S3 API for minio-go — including the aws-chunked bodies minio-go sends over plain HTTP — and the AWS SigV4 verification in front of it is real: a presigned request whose signature, key, expiry or path has been touched is refused with 403.
Header-authenticated requests (everything the server itself does) are not verified. The credential is still checked for presence, but the signature is not recomputed: minio-go signs those bodies with a streaming signature whose chunk framing gofakes3 already unwraps, and re-deriving it would be reimplementing the client. Presigned URLs are the interesting half — they are the only thing Podium ever hands to somebody else — and those are verified in full.
It is test infrastructure. Nothing in cmd/ imports it.
Index ¶
Constants ¶
const ( AccessKey = "podium-test-access-key" SecretKey = "podium-test-secret-key" Bucket = "podium-test" )
Credentials the fake accepts. They are obvious fixtures, not secrets.
Variables ¶
This section is empty.
Functions ¶
func DeadConfig ¶
DeadConfig points at a loopback port with nothing listening on it: what "the store is down" looks like to the control plane.
Types ¶
type Server ¶
type Server struct {
// URL is the endpoint, "http://127.0.0.1:port".
URL string
// Rejected counts presigned requests refused for a bad signature.
Rejected int
// contains filtered or unexported fields
}
Server is a running fake endpoint.