chore: run e2e using go test

Signed-off-by: Tao Li <tao.li@enterprisedb.com>
This commit is contained in:
Tao Li 2026-08-21 19:17:48 +08:00
parent 9bb98607b8
commit 07134bbea4
No known key found for this signature in database
GPG Key ID: 02D7CBDD527BEF02

View File

@ -156,11 +156,10 @@ tasks:
internal: true
cmds:
- >
GITHUB_REF= dagger -sc "github.com/sagikazarmark/daggerverse/golangci-lint@${DAGGER_GOLANGCI_LINT_SHA}
echo $(pwd);
GITHUB_REF= dagger -c "github.com/sagikazarmark/daggerverse/golangci-lint@${DAGGER_GOLANGCI_LINT_SHA}
--version ${GOLANGCI_LINT_VERSION} |
run . --config .golangci.yml | stdout"
sources:
- ./**/*.go
internal:wordlist-ordered:
desc: Order the word list file
@ -311,6 +310,9 @@ tasks:
internal: true
deps:
- internal:registry-network-connect
env:
# renovate: datasource=git-refs depName=docker lookupName=https://github.com/purpleclay/daggerverse currentValue=main
DAGGER_DOCKER_SHA: ee12c1a4a2630e194ec20c5a9959183e3a78c192
cmds:
- >
dagger run docker buildx build -f containers/Dockerfile.plugin --build-arg GO_VERSION={{.GO_VERSION}}
@ -323,6 +325,9 @@ tasks:
internal: true
deps:
- internal:registry-network-connect
env:
# renovate: datasource=git-refs depName=docker lookupName=https://github.com/purpleclay/daggerverse currentValue=main
DAGGER_DOCKER_SHA: ee12c1a4a2630e194ec20c5a9959183e3a78c192
cmds:
- >
dagger run docker buildx build -f containers/Dockerfile.sidecar --build-arg GO_VERSION={{.GO_VERSION}}
@ -440,7 +445,7 @@ tasks:
- internal:controller-gen
env:
# renovate: datasource=git-refs depName=crd-gen-refs lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_CRDGENREF_SHA: 7174b66d283da487638a98b431b7707b311a9a32
DAGGER_CRDGENREF_SHA: 26cd57fb6ad66e88c036b675b0478d38df93962d
# renovate: datasource=go depName=github.com/elastic/crd-ref-docs
CRDREFDOCS_VERSION: v0.3.0
cmds:
@ -538,8 +543,11 @@ tasks:
.
- rm -f {{ .KUBECONFIG_PATH }}
# Run e2e tests on the kind cluster specified by KIND_CLUSTER_NAME
integration:e2e:
desc: Run the e2e tests
summary: |
Run e2e against the Kind cluster specified by KIND_CLUSTER_NAME
deps:
- integration:deploy-to-kind
run: once
@ -555,14 +563,8 @@ tasks:
sh: docker inspect --format '{{"{{"}} (index (index .HostConfig.PortBindings "6443/tcp") 0).HostPort {{"}}"}}' {{ .KIND_CLUSTER_NAME }}-control-plane
cmds:
- kind get kubeconfig --name {{ .KIND_CLUSTER_NAME }} > {{ .KUBECONFIG_PATH }}
# kind writes the external server address as https://127.0.0.1:<port>, which is only valid on
# the host. Rewrite it to the "kubernetes" alias that --svc below binds inside the dagger container.
- defer: rm -f {{ .KUBECONFIG_PATH }}
- >
sed -i.bak "s#server: https://[^:]*:[0-9]*#server: https://kubernetes:{{ .KIND_HOSTPORT }}#" {{ .KUBECONFIG_PATH }}
- >
GITHUB_REF= dagger call -m dagger/e2e/ run
--source .
--kubeconfig {{.KUBECONFIG_PATH}}
--svc tcp://127.0.0.1:{{.KIND_HOSTPORT}}
--go-version {{.GO_VERSION}}
- rm -f {{ .KUBECONFIG_PATH }} {{ .KUBECONFIG_PATH }}.bak
kubectl --kubeconfig={{.KUBECONFIG_PATH}} config set-cluster kind-{{.KIND_CLUSTER_NAME}}
--server=https://127.0.0.1:{{.KIND_HOSTPORT}} --insecure-skip-tls-verify=true
- KUBECONFIG={{.KUBECONFIG_PATH}} go test ./test/e2e/... -v -ginkgo.v -timeout 45m