mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 05:23:04 +00:00
efe279f802
* Add a make target to run lint-consul-retry on all the modules * Cleanup sdk/testutil/retry * Fix a bunch of retry.Run* usage to not use the outer testing.T * Fix some more recent retry lint issues and pin to v1.4.0 of lint-consul-retry * Fix codegen copywrite lint issues * Don’t perform cleanup after each retry attempt by default. * Use the common testutil.TestingTB interface in test-integ/tenancy * Fix retry tests * Update otel access logging extension test to perform requests within the retry block
29 lines
1008 B
Go
29 lines
1008 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package connect
|
|
|
|
import "github.com/hashicorp/consul/sdk/testutil"
|
|
|
|
// TestSpiffeIDService returns a SPIFFE ID representing a service.
|
|
func TestSpiffeIDService(t testutil.TestingTB, service string) *SpiffeIDService {
|
|
return TestSpiffeIDServiceWithHost(t, service, TestClusterID+".consul")
|
|
}
|
|
|
|
// TestSpiffeIDServiceWithHost returns a SPIFFE ID representing a service with
|
|
// the specified trust domain.
|
|
func TestSpiffeIDServiceWithHost(t testutil.TestingTB, service, host string) *SpiffeIDService {
|
|
return TestSpiffeIDServiceWithHostDC(t, service, host, "dc1")
|
|
}
|
|
|
|
// TestSpiffeIDServiceWithHostDC returns a SPIFFE ID representing a service with
|
|
// the specified trust domain for the given datacenter.
|
|
func TestSpiffeIDServiceWithHostDC(t testutil.TestingTB, service, host, datacenter string) *SpiffeIDService {
|
|
return &SpiffeIDService{
|
|
Host: host,
|
|
Namespace: "default",
|
|
Datacenter: datacenter,
|
|
Service: service,
|
|
}
|
|
}
|