Documentation
¶
Index ¶
- func IsolatedPublishingTest(t *testing.T) bool
- func NewDisposablePostgresDatabaseURL(t testing.TB, suffix string) string
- func PostgresURL(t testing.TB) string
- func RequireOneOfTestTiers(t testing.TB, required ...TestTier)
- func RequireTestTier(t testing.TB, required TestTier)
- func SeedServicePort(t testing.TB, database interface{ ... }, service string, port int, ...)
- func TLSCertificate(t *testing.T, names []string, usages []x509.ExtKeyUsage) ([]byte, tls.Certificate)
- func UseClientKeychain(t testing.TB) string
- type PublishingFixture
- func (f *PublishingFixture) BindPublisher(key string, identity authorityv1.PublisherEnrollmentResult)
- func (f *PublishingFixture) Connection(service string) (*tunnel.Session, tunnelv1.ServicePublisherConnectionRef, bool)
- func (f *PublishingFixture) OpenHTTPVisitor(ctx context.Context, service string, source, destination netip.AddrPort) (_ net.Conn, result error)
- func (f *PublishingFixture) Run(id string) (PublishingRun, bool)
- func (f *PublishingFixture) Service(id string) (controlv1.Service, controlv1.ProjectServiceConfiguration, bool)
- func (f *PublishingFixture) SetServiceExpiration(id string, deadline *time.Time) (controlv1.Service, error)
- type PublishingHooks
- type PublishingRun
- type TestTier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsolatedPublishingTest ¶
IsolatedPublishingTest runs a command regression in its own test process so its private TLS roots cannot affect other tests or the machine's trust store. the caller returns immediately when this returns false.
func NewDisposablePostgresDatabaseURL ¶
NewDisposablePostgresDatabaseURL creates a uniquely named PostgreSQL database and drops it, including any remaining connections, during cleanup.
func PostgresURL ¶
PostgresURL returns the PostgreSQL administration URL for PostgreSQL-backed tests.
func RequireOneOfTestTiers ¶
RequireOneOfTestTiers selects a fixture shared by explicit test tiers.
func RequireTestTier ¶
RequireTestTier skips a test unless its suite is selected.
func SeedServicePort ¶
func SeedServicePort(t testing.TB, database interface { QueryRow(context.Context, string, ...any) pgx.Row }, service string, port int, now time.Time)
SeedServicePort gives an isolated fixture an already-retained public binding before any run starts. allocation and exposure mutations are tested through apply; admission/certificate fixtures can keep their independently owned setup.
func TLSCertificate ¶
func TLSCertificate(t *testing.T, names []string, usages []x509.ExtKeyUsage) ([]byte, tls.Certificate)
TLSCertificate issues a verifiable test leaf, retaining ordinary certificate and hostname checks on both native and infrastructure transports.
func UseClientKeychain ¶
UseClientKeychain leaves the ordinary file-backed client state on other platforms; subprocess tests use the same default protection in both processes.
Types ¶
type PublishingFixture ¶
type PublishingFixture struct {
URL, CAFile, AccessToken, Namespace string
// contains filtered or unexported fields
}
publishingfixture is a local fake control boundary with real WSS/yamux connections. it contains no second publication engine or PostgreSQL dependency.
func NewPublishingFixture ¶
func NewPublishingFixture(t *testing.T, hooks PublishingHooks) *PublishingFixture
func (*PublishingFixture) BindPublisher ¶
func (f *PublishingFixture) BindPublisher(key string, identity authorityv1.PublisherEnrollmentResult)
bindpublisher receives facts already verified by the signed fixture's HTTP boundary. no grant or signing key is manufactured during run preparation.
func (*PublishingFixture) Connection ¶
func (f *PublishingFixture) Connection(service string) (*tunnel.Session, tunnelv1.ServicePublisherConnectionRef, bool)
func (*PublishingFixture) OpenHTTPVisitor ¶
func (f *PublishingFixture) OpenHTTPVisitor(ctx context.Context, service string, source, destination netip.AddrPort) (_ net.Conn, result error)
OpenHTTPVisitor sends signed source metadata over the claimed relay session. the returned connection owns its capacity callback until physical close.
func (*PublishingFixture) Run ¶
func (f *PublishingFixture) Run(id string) (PublishingRun, bool)
func (*PublishingFixture) Service ¶
func (f *PublishingFixture) Service(id string) (controlv1.Service, controlv1.ProjectServiceConfiguration, bool)
func (*PublishingFixture) SetServiceExpiration ¶
func (f *PublishingFixture) SetServiceExpiration(id string, deadline *time.Time) (controlv1.Service, error)
setserviceexpiration captures the allocation deadline in the saved service. allocation replies, scoped reads and renewals use this same fixed value.
type PublishingHooks ¶
type PublishingHooks struct {
Ready func(context.Context, PublishingRun) error
Close func(PublishingRun) error
}
type PublishingRun ¶
type PublishingRun struct {
Service controlv1.Service
Preparation controlv1.ServiceRunPreparation
Setup controlv1.ServiceRunSetup
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
package certificatetest supplies private test CA chains without installing machine trust.
|
package certificatetest supplies private test CA chains without installing machine trust. |
|
Package controltest creates named OIDC session fixtures for tests whose boundary is authorization or publishing.
|
Package controltest creates named OIDC session fixtures for tests whose boundary is authorization or publishing. |
|
package deploymentdiscovery supplies local signed control/AWS HTTPS boundaries and a verified EKS TLS target.
|
package deploymentdiscovery supplies local signed control/AWS HTTPS boundaries and a verified EKS TLS target. |
|
package githubtest serves signed GitHub workload fixtures without allowing tests to substitute a production issuer or contact GitHub.
|
package githubtest serves signed GitHub workload fixtures without allowing tests to substitute a production issuer or contact GitHub. |
|
package ipdigest supplies deterministic exact-IP digests for policy fixtures.
|
package ipdigest supplies deterministic exact-IP digests for policy fixtures. |
|
package managedcert replaces only the external CA exchange in state tests.
|
package managedcert replaces only the external CA exchange in state tests. |
|
package projectinittest supplies project fixtures for init operation and command presentation tests.
|
package projectinittest supplies project fixtures for init operation and command presentation tests. |
|
Package relayslots declares the exact processes authorized by a test topology.
|
Package relayslots declares the exact processes authorized by a test topology. |
|
package visitorfixture also supplies the authority-side HTTP session fixture.
|
package visitorfixture also supplies the authority-side HTTP session fixture. |
|
package visitorpolicy supplies bounded generated-wire fixtures for policy HTTP and publisher consumer tests.
|
package visitorpolicy supplies bounded generated-wire fixtures for policy HTTP and publisher consumer tests. |
|
package workerobservation records actual worker spans and operator diagnostics through a process-owned exporter and a local HTTPS collector.
|
package workerobservation records actual worker spans and operator diagnostics through a process-owned exporter and a local HTTPS collector. |