mirror of
https://github.com/status-im/consul.git
synced 2025-02-17 16:16:44 +00:00
remove the skipping of slow tests in go-tests-ce and go-test-enterprise (#20139)
* remove the skipping of slow tests in go-tests-ce and go-test-enterprise * add license header
This commit is contained in:
parent
7d92a5dfd6
commit
3fa4a21edd
2
.github/workflows/go-tests.yml
vendored
2
.github/workflows/go-tests.yml
vendored
@ -270,7 +270,6 @@ jobs:
|
|||||||
runs-on: ${{ needs.setup.outputs.compute-large }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: ""
|
go-tags: ""
|
||||||
go-test-flags: "${{ (github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')) && '-short' || '' }}"
|
|
||||||
go-version: ${{ needs.get-go-version.outputs.go-version }}
|
go-version: ${{ needs.get-go-version.outputs.go-version }}
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
||||||
@ -293,7 +292,6 @@ jobs:
|
|||||||
runs-on: ${{ needs.setup.outputs.compute-large }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
|
||||||
go-test-flags: "${{ (github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')) && '-short' || '' }}"
|
|
||||||
go-version: ${{ needs.get-go-version.outputs.go-version }}
|
go-version: ${{ needs.get-go-version.outputs.go-version }}
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
||||||
|
@ -11,6 +11,7 @@ import (
|
|||||||
"github.com/hashicorp/consul/acl"
|
"github.com/hashicorp/consul/acl"
|
||||||
external "github.com/hashicorp/consul/agent/grpc-external"
|
external "github.com/hashicorp/consul/agent/grpc-external"
|
||||||
"github.com/hashicorp/consul/agent/structs"
|
"github.com/hashicorp/consul/agent/structs"
|
||||||
|
"github.com/hashicorp/consul/lib/testhelpers"
|
||||||
"github.com/hashicorp/consul/proto/private/pboperator"
|
"github.com/hashicorp/consul/proto/private/pboperator"
|
||||||
"github.com/hashicorp/consul/sdk/testutil/retry"
|
"github.com/hashicorp/consul/sdk/testutil/retry"
|
||||||
"google.golang.org/grpc/credentials/insecure"
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
@ -25,6 +26,8 @@ import (
|
|||||||
func TestOperatorBackend_TransferLeader(t *testing.T) {
|
func TestOperatorBackend_TransferLeader(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
testhelpers.SkipFlake(t)
|
||||||
|
|
||||||
conf := testClusterConfig{
|
conf := testClusterConfig{
|
||||||
Datacenter: "dc1",
|
Datacenter: "dc1",
|
||||||
Servers: 3,
|
Servers: 3,
|
||||||
|
14
lib/testhelpers/testhelpers.go
Normal file
14
lib/testhelpers/testhelpers.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// Copyright (c) HashiCorp, Inc.
|
||||||
|
// SPDX-License-Identifier: BUSL-1.1
|
||||||
|
package testhelpers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func SkipFlake(t *testing.T) {
|
||||||
|
if os.Getenv("RUN_FLAKEY_TESTS") != "true" {
|
||||||
|
t.Skip("Skipped because marked as flake.")
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user