|
|
|
@ -3187,33 +3187,36 @@ func TestCatalog_GatewayServices_TerminatingGateway(t *testing.T) {
|
|
|
|
|
|
|
|
|
|
expect := structs.GatewayServices{
|
|
|
|
|
{
|
|
|
|
|
Service: structs.NewServiceName("api", nil),
|
|
|
|
|
Gateway: structs.NewServiceName("gateway", nil),
|
|
|
|
|
GatewayKind: structs.ServiceKindTerminatingGateway,
|
|
|
|
|
CAFile: "api/ca.crt",
|
|
|
|
|
CertFile: "api/client.crt",
|
|
|
|
|
KeyFile: "api/client.key",
|
|
|
|
|
SNI: "my-domain",
|
|
|
|
|
ServiceKind: structs.GatewayServiceKindService,
|
|
|
|
|
Service: structs.NewServiceName("api", nil),
|
|
|
|
|
Gateway: structs.NewServiceName("gateway", nil),
|
|
|
|
|
GatewayKind: structs.ServiceKindTerminatingGateway,
|
|
|
|
|
CAFile: "api/ca.crt",
|
|
|
|
|
CertFile: "api/client.crt",
|
|
|
|
|
KeyFile: "api/client.key",
|
|
|
|
|
SNI: "my-domain",
|
|
|
|
|
ServiceKind: structs.GatewayServiceKindService,
|
|
|
|
|
AutoHostRewrite: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Service: structs.NewServiceName("db", nil),
|
|
|
|
|
Gateway: structs.NewServiceName("gateway", nil),
|
|
|
|
|
GatewayKind: structs.ServiceKindTerminatingGateway,
|
|
|
|
|
CAFile: "",
|
|
|
|
|
CertFile: "",
|
|
|
|
|
KeyFile: "",
|
|
|
|
|
ServiceKind: structs.GatewayServiceKindService,
|
|
|
|
|
Service: structs.NewServiceName("db", nil),
|
|
|
|
|
Gateway: structs.NewServiceName("gateway", nil),
|
|
|
|
|
GatewayKind: structs.ServiceKindTerminatingGateway,
|
|
|
|
|
CAFile: "",
|
|
|
|
|
CertFile: "",
|
|
|
|
|
KeyFile: "",
|
|
|
|
|
ServiceKind: structs.GatewayServiceKindService,
|
|
|
|
|
AutoHostRewrite: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Service: structs.NewServiceName("redis", nil),
|
|
|
|
|
Gateway: structs.NewServiceName("gateway", nil),
|
|
|
|
|
GatewayKind: structs.ServiceKindTerminatingGateway,
|
|
|
|
|
CAFile: "ca.crt",
|
|
|
|
|
CertFile: "client.crt",
|
|
|
|
|
KeyFile: "client.key",
|
|
|
|
|
SNI: "my-alt-domain",
|
|
|
|
|
FromWildcard: true,
|
|
|
|
|
Service: structs.NewServiceName("redis", nil),
|
|
|
|
|
Gateway: structs.NewServiceName("gateway", nil),
|
|
|
|
|
GatewayKind: structs.ServiceKindTerminatingGateway,
|
|
|
|
|
CAFile: "ca.crt",
|
|
|
|
|
CertFile: "client.crt",
|
|
|
|
|
KeyFile: "client.key",
|
|
|
|
|
SNI: "my-alt-domain",
|
|
|
|
|
FromWildcard: true,
|
|
|
|
|
AutoHostRewrite: true,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|