2018-03-10 01:16:12 +00:00
|
|
|
package structs
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mitchellh/go-testing-interface"
|
|
|
|
)
|
|
|
|
|
2018-05-04 21:10:03 +00:00
|
|
|
// TestServiceDefinition returns a ServiceDefinition for a typical service.
|
|
|
|
func TestServiceDefinition(t testing.T) *ServiceDefinition {
|
|
|
|
return &ServiceDefinition{
|
|
|
|
Name: "db",
|
2018-09-12 16:07:47 +00:00
|
|
|
Port: 1234,
|
2018-05-04 21:10:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-10 01:16:12 +00:00
|
|
|
// TestServiceDefinitionProxy returns a ServiceDefinition for a proxy.
|
|
|
|
func TestServiceDefinitionProxy(t testing.T) *ServiceDefinition {
|
|
|
|
return &ServiceDefinition{
|
2018-09-12 16:07:47 +00:00
|
|
|
Kind: ServiceKindConnectProxy,
|
|
|
|
Name: "foo-proxy",
|
|
|
|
Port: 1234,
|
|
|
|
Proxy: &ConnectProxyConfig{
|
|
|
|
DestinationServiceName: "db",
|
|
|
|
},
|
2018-03-10 01:16:12 +00:00
|
|
|
}
|
|
|
|
}
|