{"modulePath":"github.com/qdrant/qcloud-cli","version":"v0.37.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package framework\n\nPackage framework provides shared helpers for the qcloud e2e test suite.\n\n## Functions\n\n```go\nfunc Binary() (string, error)\n```\nBinary returns the path to the qcloud binary to exercise. The binary is resolved exactly once per process:\n\n 1. $QCLOUD\\_E2E\\_BINARY, if set.\n 2. A cached download of the release named by $QCLOUD\\_E2E\\_RELEASE (default \"latest\"), verified against the release's checksums.txt.\n\nDownloads are cached under os.UserCacheDir()/qcloud-e2e keyed by the archive sha256, so repeated test runs on the same host reuse the same binary.\n\n## Types\n\n```go\ntype Env struct {\n\tBinaryPath string\n\tAPIKey     string\n\tAccountID  string\n\tEndpoint   string\n\t// contains filtered or unexported fields\n}\n```\nEnv bundles everything an e2e test needs to shell out to qcloud against a real Qdrant Cloud backend.\n\n```go\nfunc NewEnv(t *testing.T) *Env\n```\nNewEnv returns an Env wired up with credentials from the environment and an isolated empty config file. It skips the test if QCLOUD\\_E2E is not set.\n\nThe binary is the one returned by Binary; it is resolved once per process.\n\n```go\nfunc (e *Env) Redact(s string) string\n```\nRedact masks the API key and JWT-like tokens in s. Useful when asserting against stdout/stderr.\n\n```go\nfunc (e *Env) Run(t *testing.T, args ...string) RunResult\n```\nRun invokes the binary with the given args and the default timeout, failing the test if the command exits non-zero. Stdout and stderr are streamed to t.Log.\n\n```go\nfunc (e *Env) RunAllowFail(t *testing.T, args ...string) RunResult\n```\nRunAllowFail is like Run but returns the result without failing the test. Useful for commands where a non-zero exit is part of the assertion.\n\n```go\nfunc (e *Env) RunJSON(t *testing.T, v any, args ...string)\n```\nRunJSON appends --json to args, runs the binary, and decodes stdout into v.\n\n```go\nfunc (e *Env) RunWithTimeout(t *testing.T, timeout time.Duration, args ...string) RunResult\n```\nRunWithTimeout is Run with a caller-supplied timeout.\n\n```go\ntype RunResult struct {\n\tStdout   string\n\tStderr   string\n\tExitCode int\n\tErr      error\n}\n```\nRunResult holds the outcome of a single binary invocation.\n\n","path":"github.com/qdrant/qcloud-cli/test/e2e/framework","name":"framework","synopsis":"Package framework provides shared helpers for the qcloud e2e test suite.","isRedistributable":true}
