consul/agent/connect/testing_spiffe.go

16 lines
356 B
Go
Raw Normal View History

2018-03-20 03:29:14 +00:00
package connect
import (
"github.com/mitchellh/go-testing-interface"
)
// TestSpiffeIDService returns a SPIFFE ID representing a service.
func TestSpiffeIDService(t testing.T, service string) *SpiffeIDService {
return &SpiffeIDService{
Host: testClusterID + ".consul",
Namespace: "default",
Datacenter: "dc01",
Service: service,
}
}