Skip to content

Commit d24b5de

Browse files
committed
fix(ci): show test output on failures
Signed-off-by: Leonardo Cecchi <[email protected]>
1 parent e40ba70 commit d24b5de

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Taskfile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ tasks:
137137
--kube-version ${K8S_VERSION}
138138
--setup-envtest-version ${SETUP_ENVTEST_VERSION}
139139
unit-test --src .
140+
stdout
140141
sources:
141142
- ./**/*.go
142143

dagger/gotest/main.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package main
1616

1717
import (
18-
"context"
1918
"fmt"
2019

2120
"dagger/gotest/internal/dagger"
@@ -78,11 +77,10 @@ func New(
7877
}
7978

8079
func (m *Gotest) UnitTest(
81-
ctx context.Context,
8280
// Source directory
8381
// +required
8482
src *dagger.Directory,
85-
) (string, error) {
83+
) *dagger.Container {
8684
envtestCmd := []string{"setup-envtest", "use", "-p", "path", m.KubeVersion}
8785
return m.Ctr.WithDirectory("/src", src).
8886
// Setup envtest. There is no proper way to install it from a git release, so we use the go install command
@@ -93,5 +91,5 @@ func (m *Gotest) UnitTest(
9391
WithWorkdir("/src").
9492
// Exclude the e2e tests, we don't want to run them here
9593
WithoutDirectory("/src/test/e2e").
96-
WithExec([]string{"go", "test", "./..."}).Stdout(ctx)
94+
WithExec([]string{"go", "test", "./..."})
9795
}

0 commit comments

Comments
 (0)