open-consul/agent/connect/testing_spiffe.go
2018-06-14 09:41:51 -07:00

16 lines
356 B
Go

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,
}
}