Documentation
¶
Overview ¶
Package functiontest holds test helpers shared by the builtin gitlab_project.* function tests: an httptest-backed GitLab client and a JSONL output-file parser. These intentionally live in a non-_test.go file so they're importable from sibling packages' tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGitlabClient ¶
NewGitlabClient stands up an httptest server with the given handler and returns a *gitlab.Client wired to it. The server is closed on test cleanup.
Retries are disabled — the upstream client retries 5xx five times with exponential backoff, which would turn each error-path test into a multi-second wait. The retry behaviour is the library's, not ours, so skipping it in tests doesn't weaken anything.
func ParseOutputFile ¶
ParseOutputFile reads a JSONL output file and returns {name: value}. String-valued outputs only — that's all the scalar gitlab_project.* functions produce.
func ParseOutputFileAny ¶
ParseOutputFileAny reads a JSONL output file and returns {name: value} with each value decoded as any — so a struct output arrives as map[string]any and an array output as []any. Use this for functions that emit structured (non-string) outputs, e.g. gitlab_project.read_files's files array.
Types ¶
This section is empty.