Documentation
¶
Index ¶
- func CheckEnv(key string) (string, string, bool)
- func CheckTestDB() (string, bool)
- func CheckTestRedisClient() (string, bool)
- func FGAServer(t testing.TB) string
- func MustOpenTestDB(t testing.TB) *sqlx.DB
- func MustOpenTestRedisClient(t testing.TB) *redis.Client
- func NewRecorder(path string, replaceUrl string) *recorder.Recorder
- func NewTestServer(baseDir string) *httptest.Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTestDB ¶
func CheckTestRedisClient ¶
func FGAServer ¶ added in v1.3.3
FGAServer starts an in-process OpenFGA server with in-memory storage and returns its HTTP endpoint URL. The server is automatically shut down when the test completes.
If TL_TEST_FGA_ENDPOINT is set, it returns that URL instead (for CI service containers or external servers).
func NewRecorder ¶
NewRecorder returns a configured recorder. It doesn't support absolute paths, so can't use testutil.RelPath() Must be relative to test directory, not project root.
func NewTestServer ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.