tests
for each backend exposed by the grafana-stack module.Installation
dagger install github.com/z5labs/devex/daggerverse/grafana-stack/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453Entrypoint
Return Type
Tests Example
dagger -m github.com/z5labs/devex/daggerverse/grafana-stack/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
func (m *MyModule) Example() *dagger.Tests {
return dag.
Tests()
}@function
def example() -> dagger.Tests:
return (
dag.tests()
)@func()
example(): Tests {
return dag
.tests()
}Types
Tests 🔗
all() 🔗
All runs every grafana-stack round-trip test in parallel.
Each tag flag is forwarded to the matching per-backend test so a fresh upstream release can be qualified at the CLI without editing any module:
dagger -m daggerverse/grafana-stack/tests call all --grafana-tag=12.1.0
dagger -m daggerverse/grafana-stack/tests call all --loki-tag=3.5.0
Defaults match the parent module’s pinned defaults so the bare
call all keeps working.
parallel caps how many tests run concurrently inside this suite. Defaults to 0 (unbounded fan-out).
All exists as a convenience for local dagger call all invocations.
CI does NOT call All: each of the four round-trips below carries its
own +check directive, so GH Actions schedules each onto its own
runner in parallel.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| lokiTag | String ! | "3.4.1" | grafana/loki image tag. |
| tempoTag | String ! | "2.7.1" | grafana/tempo image tag. |
| mimirTag | String ! | "2.15.1" | grafana/mimir image tag. |
| grafanaTag | String ! | "12.0.0" | grafana/grafana image tag. |
| parallel | Integer ! | 0 | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/grafana-stack/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
all --loki-tag string --tempo-tag string --mimir-tag string --grafana-tag string --parallel integerfunc (m *MyModule) Example(ctx context.Context, lokiTag string, tempoTag string, mimirTag string, grafanaTag string, parallel int) {
return dag.
Tests().
All(ctx, lokiTag, tempoTag, mimirTag, grafanaTag, parallel)
}@function
async def example(lokitag: str, tempotag: str, mimirtag: str, grafanatag: str, parallel: int) -> None:
return await (
dag.tests()
.all(lokitag, tempotag, mimirtag, grafanatag, parallel)
)@func()
async example(lokiTag: string, tempoTag: string, mimirTag: string, grafanaTag: string, parallel: number): Promise<void> {
return dag
.tests()
.all(lokiTag, tempoTag, mimirTag, grafanaTag, parallel)
}grafanaProxiesLokiQuery() 🔗
GrafanaProxiesLokiQuery starts a Loki backend and a Grafana UI wired to it via WithLokiDatasource, posts a single OTLP log carrying a unique marker UUID directly to Loki, then issues an authenticated LogQL query through Grafana’s datasource proxy (/api/datasources/proxy/uid//loki/api/v1/query_range) until the marker reappears in the response. Verifies admin-password file mounting, datasources.yaml provisioning, the in-network service binding hostname, and Grafana’s proxy plumbing all work end-to-end.
lokiTag and grafanaTag override their respective image tags at the CLI; both default to the parent module’s pinned defaults.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| lokiTag | String ! | "3.4.1" | No description provided |
| grafanaTag | String ! | "12.0.0" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/grafana-stack/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
grafana-proxies-loki-query --loki-tag string --grafana-tag stringfunc (m *MyModule) Example(ctx context.Context, lokiTag string, grafanaTag string) {
return dag.
Tests().
Grafanaproxieslokiquery(ctx, lokiTag, grafanaTag)
}@function
async def example(lokitag: str, grafanatag: str) -> None:
return await (
dag.tests()
.grafanaproxieslokiquery(lokitag, grafanatag)
)@func()
async example(lokiTag: string, grafanaTag: string): Promise<void> {
return dag
.tests()
.grafanaProxiesLokiQuery(lokiTag, grafanaTag)
}lokiAcceptsOtlpLogs() 🔗
LokiAcceptsOtlpLogs starts a Loki service, posts a single log record via the OTLP/HTTP receiver carrying a unique marker UUID, then queries Loki LogQL until the marker reappears in the query response. Verifies the default config wires up the OTLP HTTP ingester end-to-end.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| tag | String ! | "3.4.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/grafana-stack/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
loki-accepts-otlp-logs --tag stringfunc (m *MyModule) Example(ctx context.Context, tag string) {
return dag.
Tests().
Lokiacceptsotlplogs(ctx, tag)
}@function
async def example(tag: str) -> None:
return await (
dag.tests()
.lokiacceptsotlplogs(tag)
)@func()
async example(tag: string): Promise<void> {
return dag
.tests()
.lokiAcceptsOtlpLogs(tag)
}mimirAcceptsOtlpMetrics() 🔗
MimirAcceptsOtlpMetrics starts a Mimir service, posts a single gauge sample via the OTLP/HTTP receiver under a uniquely-named metric, then queries Mimir’s Prometheus-compatible API until that metric appears. Verifies the default config wires up the OTLP HTTP ingester and the filesystem block store end-to-end.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| tag | String ! | "2.15.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/grafana-stack/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
mimir-accepts-otlp-metrics --tag stringfunc (m *MyModule) Example(ctx context.Context, tag string) {
return dag.
Tests().
Mimiracceptsotlpmetrics(ctx, tag)
}@function
async def example(tag: str) -> None:
return await (
dag.tests()
.mimiracceptsotlpmetrics(tag)
)@func()
async example(tag: string): Promise<void> {
return dag
.tests()
.mimirAcceptsOtlpMetrics(tag)
}tempoAcceptsOtlpTraces() 🔗
TempoAcceptsOtlpTraces starts a Tempo service, posts a single span via the OTLP/HTTP receiver carrying a unique 16-byte trace ID, then polls /api/traces/ until Tempo returns the trace. Verifies the default config wires up the OTLP HTTP receiver and the local trace store end-to-end.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| tag | String ! | "2.7.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/grafana-stack/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
tempo-accepts-otlp-traces --tag stringfunc (m *MyModule) Example(ctx context.Context, tag string) {
return dag.
Tests().
Tempoacceptsotlptraces(ctx, tag)
}@function
async def example(tag: str) -> None:
return await (
dag.tests()
.tempoacceptsotlptraces(tag)
)@func()
async example(tag: string): Promise<void> {
return dag
.tests()
.tempoAcceptsOtlpTraces(tag)
}