tests
is exposed as a standalone dagger function so it can be invoked individuallyduring TDD; All wires them up for parallel execution under `dagger call all`.
Installation
dagger install github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453Entrypoint
Return Type
Tests Example
dagger -m github.com/z5labs/devex/daggerverse/go/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 go-module test in parallel. goImageTag is forwarded to each per-test as the Go toolchain image tag passed to dag.Go(); an empty string preserves the module’s default behavior (infer from each fixture’s go.mod for source-bearing tests, fall back to “latest” otherwise).
Note: ContainerInfersVersionFromGoMod intentionally ignores goImageTag — it asserts the empty-version inference path against a 1.23 fixture, so a caller-supplied override would defeat what the test is verifying.
parallel caps how many tests run concurrently inside this suite. Defaults
to 0 (unbounded fan-out) — each dagger check job runs on its own GH
Actions runner, so in-runner parallelism is bounded by the VM’s
CPU/memory, not by the scheduler. Pass any positive integer to opt into
a specific cap.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | "" | No description provided |
| parallel | Integer ! | 0 | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
all --go-image-tag string --parallel integerfunc (m *MyModule) Example(ctx context.Context, goImageTag string, parallel int) {
return dag.
Tests().
All(ctx, goImageTag, parallel)
}@function
async def example(goimagetag: str, parallel: int) -> None:
return await (
dag.tests()
.all(goimagetag, parallel)
)@func()
async example(goImageTag: string, parallel: number): Promise<void> {
return dag
.tests()
.all(goImageTag, parallel)
}buildHelloWritesBinary() 🔗
BuildHelloWritesBinary builds the hello fixture into /out and asserts the produced “hello” binary is non-empty.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
build-hello-writes-binary --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Buildhellowritesbinary(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.buildhellowritesbinary(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.buildHelloWritesBinary(goImageTag)
}buildMultipkgDotSlashEllipsis() 🔗
BuildMultipkgDotSlashEllipsis builds the multipkg fixture with the default pkg=./… and asserts the produced multipkg binary is non-empty. Only the root main package contributes a binary; pkg/foo is a library.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
build-multipkg-dot-slash-ellipsis --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Buildmultipkgdotslashellipsis(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.buildmultipkgdotslashellipsis(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.buildMultipkgDotSlashEllipsis(goImageTag)
}ciCheckRunsEnabledChecksAndSkipsBuild() 🔗
CiCheckRunsEnabledChecksAndSkipsBuild configures every With* stage
against the clean hello fixture and calls Check (not Run), asserting
no error. To actively prove Check does not invoke the build stage
internally, WithBuild is configured with a non-existent package path:
if Check were to call runBuild, go build ./does-not-exist would
fail and surface here as an error. A nil return therefore proves
both (a) the checks passed and (b) the build was skipped.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
ci-check-runs-enabled-checks-and-skips-build --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Cicheckrunsenabledchecksandskipsbuild(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.cicheckrunsenabledchecksandskipsbuild(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.ciCheckRunsEnabledChecksAndSkipsBuild(goImageTag)
}ciRunHelloAllStages() 🔗
CiRunHelloAllStages runs Ci with every stage enabled against the hello fixture and asserts a non-empty binary is produced.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
ci-run-hello-all-stages --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Cirunhelloallstages(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.cirunhelloallstages(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.ciRunHelloAllStages(goImageTag)
}ciRunHelloDefaultsProduceModuleNameBinary() 🔗
CiRunHelloDefaultsProduceModuleNameBinary asserts that Ci.Run with no builders configured still produces a binary named after the go.mod module path (example.com/hello → “hello”).
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
ci-run-hello-defaults-produce-module-name-binary --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Cirunhellodefaultsproducemodulenamebinary(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.cirunhellodefaultsproducemodulenamebinary(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.ciRunHelloDefaultsProduceModuleNameBinary(goImageTag)
}ciRunVetBadAggregates() 🔗
CiRunVetBadAggregates runs Ci against the vet-bad fixture with both Vet
and Lint enabled and asserts that stage-1 aggregated BOTH job failures
rather than short-circuiting on the first. parallel.New concatenates each
job’s raw error (job names appear in trace spans, not the Go-level
string), so each underlying withExec failure surfaces as a separate
“exit code: 1” line. Counting those occurrences confirms both vet and
lint ran and both errors were propagated through Run.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
ci-run-vet-bad-aggregates --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Cirunvetbadaggregates(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.cirunvetbadaggregates(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.ciRunVetBadAggregates(goImageTag)
}ciWithBuildCustomBinaryName() 🔗
CiWithBuildCustomBinaryName configures a custom binary name via WithBuild and asserts the produced File carries that name.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
ci-with-build-custom-binary-name --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Ciwithbuildcustombinaryname(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.ciwithbuildcustombinaryname(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.ciWithBuildCustomBinaryName(goImageTag)
}ciWithFmtPasses() 🔗
CiWithFmtPasses runs Ci with the Fmt stage enabled against the gofmt-clean hello fixture and asserts a non-empty binary is produced.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
ci-with-fmt-passes --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Ciwithfmtpasses(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.ciwithfmtpasses(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.ciWithFmtPasses(goImageTag)
}ciWithLintPasses() 🔗
CiWithLintPasses runs Ci with the Lint stage enabled against the clean hello fixture and asserts a non-empty binary is produced. Uses the pinned default golangci-lint version.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
ci-with-lint-passes --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Ciwithlintpasses(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.ciwithlintpasses(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.ciWithLintPasses(goImageTag)
}ciWithTestPasses() 🔗
CiWithTestPasses runs Ci with the Test stage enabled (no race) against hello and asserts a non-empty binary is produced.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
ci-with-test-passes --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Ciwithtestpasses(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.ciwithtestpasses(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.ciWithTestPasses(goImageTag)
}ciWithTestRacePasses() 🔗
CiWithTestRacePasses runs Ci with the Test stage enabled with -race and asserts a non-empty binary is produced.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
ci-with-test-race-passes --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Ciwithtestracepasses(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.ciwithtestracepasses(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.ciWithTestRacePasses(goImageTag)
}ciWithVetPasses() 🔗
CiWithVetPasses runs Ci with the Vet stage enabled against the vet-clean hello fixture and asserts a non-empty binary is produced.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
ci-with-vet-passes --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Ciwithvetpasses(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.ciwithvetpasses(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.ciWithVetPasses(goImageTag)
}containerHasGoToolchain() 🔗
ContainerHasGoToolchain proves the base container is reachable, the source
is mounted at /src, and the golang image’s go binary runs. This is the
canary for every other test — if it fails, the rest can’t possibly pass.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
container-has-go-toolchain --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Containerhasgotoolchain(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.containerhasgotoolchain(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.containerHasGoToolchain(goImageTag)
}containerInfersVersionFromGoMod() 🔗
ContainerInfersVersionFromGoMod asserts that constructing the module with
New(“”) and a fixture whose go.mod declares go 1.23 actually pulls the
matching golang:1.23 image — i.e. resolveVersion + go.mod parsing wire
through to the toolchain selection. Catches regressions in go.mod parsing
or in the fallback path silently using latest.
goImageTag is accepted for signature uniformity (All forwards it to every test) but deliberately ignored: this test exercises the empty-version inference path, so a caller-supplied override would defeat what’s being verified.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
container-infers-version-from-go-mod --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Containerinfersversionfromgomod(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.containerinfersversionfromgomod(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.containerInfersVersionFromGoMod(goImageTag)
}envContainsGoroot() 🔗
EnvContainsGoroot calls dag.Go(dagger.GoOpts{Version: goImageTag}).Env and asserts the output mentions GOROOT
— the canonical signal that go env ran inside the prepared container.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
env-contains-goroot --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Envcontainsgoroot(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.envcontainsgoroot(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.envContainsGoroot(goImageTag)
}fmtHelloIsClean() 🔗
FmtHelloIsClean runs Fmt against the gofmt-clean hello fixture and asserts the diff is empty.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
fmt-hello-is-clean --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Fmthelloisclean(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.fmthelloisclean(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.fmtHelloIsClean(goImageTag)
}generateHelloProducesFile() 🔗
GenerateHelloProducesFile runs go generate against the hello fixture and asserts the //go:generate directive produced out.txt with the expected content.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
generate-hello-produces-file --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Generatehelloproducesfile(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.generatehelloproducesfile(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.generateHelloProducesFile(goImageTag)
}installSmallToolReturnsBinary() 🔗
InstallSmallToolReturnsBinary installs a small public tool (stringer) and asserts the returned binary is non-empty. The version is pinned so CI doesn’t drift with upstream releases. Requires network egress for the initial fetch; subsequent runs hit the go-mod-cache.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
install-small-tool-returns-binary --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Installsmalltoolreturnsbinary(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.installsmalltoolreturnsbinary(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.installSmallToolReturnsBinary(goImageTag)
}modDownloadHelloPasses() 🔗
ModDownloadHelloPasses runs ModDownload against the hello fixture and asserts no error.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
mod-download-hello-passes --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Moddownloadhellopasses(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.moddownloadhellopasses(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.modDownloadHelloPasses(goImageTag)
}modTidyHelloIsIdempotent() 🔗
ModTidyHelloIsIdempotent runs go mod tidy against the stdlib-only hello
fixture and asserts the resulting go.mod is unchanged.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
mod-tidy-hello-is-idempotent --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Modtidyhelloisidempotent(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.modtidyhelloisidempotent(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.modTidyHelloIsIdempotent(goImageTag)
}modVerifyHelloPasses() 🔗
ModVerifyHelloPasses runs ModVerify against the hello fixture and asserts no error.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
mod-verify-hello-passes --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Modverifyhellopasses(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.modverifyhellopasses(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.modVerifyHelloPasses(goImageTag)
}runHelloPrintsHello() 🔗
RunHelloPrintsHello runs the hello fixture’s main and asserts stdout is “hello\n”.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
run-hello-prints-hello --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Runhelloprintshello(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.runhelloprintshello(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.runHelloPrintsHello(goImageTag)
}testHelloPasses() 🔗
TestHelloPasses runs go test ./... against the hello fixture and asserts
the canonical “PASS” marker appears in stdout.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
test-hello-passes --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Testhellopasses(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.testhellopasses(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.testHelloPasses(goImageTag)
}testMultipkgPkgArgVariants() 🔗
TestMultipkgPkgArgVariants runs go test against the multipkg fixture
twice — once with pkg=./… (covers the whole module) and once with
pkg=./pkg/foo (sub-package only) — to confirm the pkg arg shape.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
test-multipkg-pkg-arg-variants --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Testmultipkgpkgargvariants(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.testmultipkgpkgargvariants(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.testMultipkgPkgArgVariants(goImageTag)
}toolVersionContainsGoVersion() 🔗
ToolVersionContainsGoVersion calls dag.Go(dagger.GoOpts{Version: goImageTag}).ToolVersion and asserts the output starts with the canonical “go version” prefix.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
tool-version-contains-go-version --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Toolversioncontainsgoversion(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.toolversioncontainsgoversion(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.toolVersionContainsGoVersion(goImageTag)
}vetHelloPasses() 🔗
VetHelloPasses runs Vet against the hello fixture, which is vet-clean, so the call must succeed.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
vet-hello-passes --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Vethellopasses(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.vethellopasses(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.vetHelloPasses(goImageTag)
}workInitSucceeds() 🔗
WorkInitSucceeds runs go work init . against the hello fixture and
asserts no error. go work init is a side-effecting subcommand that
returns empty stdout on success — the assertion is the absence of error.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| goImageTag | String ! | - | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/go/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
work-init-succeeds --go-image-tag stringfunc (m *MyModule) Example(ctx context.Context, goImageTag string) {
return dag.
Tests().
Workinitsucceeds(ctx, goImageTag)
}@function
async def example(goimagetag: str) -> None:
return await (
dag.tests()
.workinitsucceeds(goimagetag)
)@func()
async example(goImageTag: string): Promise<void> {
return dag
.tests()
.workInitSucceeds(goImageTag)
}