[v11.2.x] Chore: Update tests to use go-workspace script (#92323)

* Chore: Update tests to use go-workspace script (#91746)

(cherry picked from commit 13703de67e)

* Chore: Fix requires_buildifier typo (#91747)

* Chore: Revert drone go workspace change to tests (#91762)

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-08-22 20:03:35 +03:00
committed by GitHub
co-authored by Todd Treece
parent 312471f3e5
commit db912c8722
5 changed files with 32 additions and 25 deletions
+3 -3
View File
@@ -553,7 +553,7 @@ def test_backend_step():
# shared-mime-info and shared-mime-info-lang is used for exactly 1 test for the
# mime.TypeByExtension function.
"apk add --update build-base shared-mime-info shared-mime-info-lang",
"go list -f '{{.Dir}}/...' -m | xargs go test -tags requires_buildifer -short -covermode=atomic -timeout=5m",
"go list -f '{{.Dir}}/...' -m | xargs go test -short -covermode=atomic -timeout=5m",
],
}
@@ -1056,7 +1056,7 @@ def mysql_integration_tests_steps(hostname, version):
def redis_integration_tests_steps():
cmds = [
"go clean -testcache",
"go list -f '{{.Dir}}/...' -m | xargs go test -run IntegrationRedis -covermode=atomic -timeout=2m",
"go list -f '{{.Dir}}/...' -m | xargs go test -run IntegrationRedis -covermode=atomic -timeout=2m",
]
environment = {
@@ -1081,7 +1081,7 @@ def remote_alertmanager_integration_tests_steps():
def memcached_integration_tests_steps():
cmds = [
"go clean -testcache",
"go list -f '{{.Dir}}/...' -m | xargs go test -run IntegrationMemcached -covermode=atomic -timeout=2m",
"go list -f '{{.Dir}}/...' -m | xargs go test -run IntegrationMemcached -covermode=atomic -timeout=2m",
]
environment = {
+1 -1
View File
@@ -156,7 +156,7 @@ def test_backend_step_windows():
"wire-install",
],
"commands": [
"go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...",
"go test -short -covermode=atomic -timeout=5m ./pkg/...",
],
}
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
DELIMITER="/...
"
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
go run scripts/go-workspace/main.go list-submodules --path "${REPO_ROOT}/go.work" --delimiter "${DELIMITER}"