Documentation
¶
Index ¶
- Constants
- func BackupAndRestore(t testing.TB) func()
- func BackupAndRestoreEnv(k string) func()
- func BackupAndRestoreWithId(t testing.TB, id string) func()
- func CompareGoldens(t testing.TB, out, goldenName string)
- func CurrentShardNumber() int
- func GetCurrentGitBranch(t *testing.T) string
- func GetOsVersion(t *testing.T) string
- func IsGithubAction() bool
- func IsMinioRunning() bool
- func IsOnline() bool
- func IsShardedTestRun() bool
- func MakeFakeHistoryEntry(command string) data.HistoryEntry
- func MarkTestForSharding(t *testing.T, testShardNumber int)
- func NumTestShards() int
- func ResetFakeHistoryTimestamp()
- func ResetLocalState(t testing.TB)
- func RunMinioServer() func()
- func RunTestServer() func()
- func TestLog(t testing.TB, line string)
Constants ¶
const ( DB_WAL_PATH = data.DB_PATH + "-wal" DB_SHM_PATH = data.DB_PATH + "-shm" )
const ( MinioEndpoint = "http://127.0.0.1:9000" MinioAccessKeyID = "minioadmin" MinioSecretAccessKey = "minioadmin" MinioBucket = "hishtory-test" MinioRegion = "us-east-1" )
MinIO test configuration
const DefaultGitBranchName = "master"
Variables ¶
This section is empty.
Functions ¶
func BackupAndRestore ¶
func BackupAndRestoreEnv ¶
func BackupAndRestoreEnv(k string) func()
func BackupAndRestoreWithId ¶
func CompareGoldens ¶
func CurrentShardNumber ¶
func CurrentShardNumber() int
CurrentShardNumber returns the current shard number, or -1 if not sharding.
func GetCurrentGitBranch ¶
func GetOsVersion ¶
func IsGithubAction ¶
func IsGithubAction() bool
func IsMinioRunning ¶
func IsMinioRunning() bool
IsMinioRunning checks if the MinIO server is running and accessible
func IsShardedTestRun ¶
func IsShardedTestRun() bool
IsShardedTestRun returns whether this is a sharded test run (i.e., in GitHub Actions).
func MakeFakeHistoryEntry ¶
func MakeFakeHistoryEntry(command string) data.HistoryEntry
func MarkTestForSharding ¶
MarkTestForSharding marks the given test for sharding with the given test ID number. Tests with the same shard number will run on the same shard.
func NumTestShards ¶
func NumTestShards() int
NumTestShards returns the total number of test shards, or -1 if not sharding.
func ResetFakeHistoryTimestamp ¶
func ResetFakeHistoryTimestamp()
func ResetLocalState ¶
func RunMinioServer ¶
func RunMinioServer() func()
RunMinioServer starts a MinIO server for S3 backend testing. On macOS, it prefers using a native MinIO binary (installed via brew). On other platforms, it uses Docker to run MinIO. If neither is available, it prints a warning and returns a no-op cleanup function.
func RunTestServer ¶
func RunTestServer() func()
Types ¶
This section is empty.