Documentation
¶
Overview ¶
Package integration contains an end-to-end test harness that stands up a real Hilt in-process alongside mocks of the services it talks to — a management console (REST), the Ingot S3 gateway (UCAN RPC), and the Sprue upload service (UCAN RPC) plus a mock did:plc directory — so the REST and RPC APIs can be exercised together with the real AWS S3 SDK.
Index ¶
Constants ¶
const Region = "us-east-1"
Region is the region the mock Ingot provider serves and tenants are created in.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Console ¶
type Console struct {
// contains filtered or unexported fields
}
Console is a mock management console: the partner-facing means of creating tenants and access keys. It drives Hilt's REST management API using the existing management client, authenticating with the partner key.
func (*Console) CreateAccessKey ¶
func (c *Console) CreateAccessKey(ctx context.Context, tenantID, name string, perms []string) (api.CreatedAccessKey, error)
CreateAccessKey creates an S3 access key with the given permissions and returns it, including the one-time secret access key.
type Network ¶
type Network struct {
HiltURL string
HiltDID did.DID
IngotDID did.DID
Admin *client.AdminClient
Console *Console
Ingot *mockIngot
Sprue *mockSprue
PLC *mockPLC
}
Network is the running integration network: a real Hilt plus the mocks and the clients needed to drive it. All resources are torn down via t.Cleanup.
func Start ¶
Start brings up the whole network in-process and returns a ready Network. The order matters: the Sprue and PLC mocks come up first because Hilt's config points at them (and embeds a Sprue→Hilt delegation), then Hilt boots, then the Ingot (whose Hilt client needs Hilt's DID and Hilt→Ingot delegations).