Documentation
¶
Overview ¶
Package testenv provides real infrastructure for integration tests (build tag `integration`, spec 14 §1).
PostgreSQL and NATS come from QS_TEST_PG_DSN and QS_TEST_NATS_URL when set (the DevSpace dev pod points them at servers in the dev namespace); otherwise containers are started once per test binary with testcontainers (CI, machines with Docker).
Index ¶
Constants ¶
const NATSURLEnv = "QS_TEST_NATS_URL"
NATSURLEnv names the variable with the URL of an existing NATS server with JetStream enabled.
const PostgresDSNEnv = "QS_TEST_PG_DSN"
PostgresDSNEnv names the variable with an admin DSN (URL form) of an existing server; the role must be allowed to create databases.
Variables ¶
This section is empty.
Functions ¶
func NATS ¶
NATS returns the URL of a NATS server with JetStream. The server is shared: tests isolate themselves with unique stream and subject names (Name).
Types ¶
This section is empty.