mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 21:23:12 +01:00
fix(ci): show test output on failures
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
This commit is contained in:
parent
b2645827b8
commit
39c14d2ebe
@ -137,6 +137,7 @@ tasks:
|
||||
--kube-version ${K8S_VERSION}
|
||||
--setup-envtest-version ${SETUP_ENVTEST_VERSION}
|
||||
unit-test --src .
|
||||
stdout
|
||||
sources:
|
||||
- ./**/*.go
|
||||
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"dagger/gotest/internal/dagger"
|
||||
@ -78,11 +77,10 @@ func New(
|
||||
}
|
||||
|
||||
func (m *Gotest) UnitTest(
|
||||
ctx context.Context,
|
||||
// Source directory
|
||||
// +required
|
||||
src *dagger.Directory,
|
||||
) (string, error) {
|
||||
) *dagger.Container {
|
||||
envtestCmd := []string{"setup-envtest", "use", "-p", "path", m.KubeVersion}
|
||||
return m.Ctr.WithDirectory("/src", src).
|
||||
// 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(
|
||||
WithWorkdir("/src").
|
||||
// Exclude the e2e tests, we don't want to run them here
|
||||
WithoutDirectory("/src/test/e2e").
|
||||
WithExec([]string{"go", "test", "./..."}).Stdout(ctx)
|
||||
WithExec([]string{"go", "test", "./..."})
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user