tests: Cleanup endpoints

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
Marek Siarkowicz
2023-03-30 17:26:41 +02:00
parent 7c7f636aea
commit 0cbd56e8b6
25 changed files with 53 additions and 67 deletions

View File

@ -34,13 +34,13 @@ import (
// Prefer dedicated clusters for substancial test-cases.
type LazyCluster interface {
// EndpointsV2 - exposes connection points for client v2.
// EndpointsHTTP - exposes connection points for http endpoints.
// Calls to this method might initialize the cluster.
EndpointsV2() []string
EndpointsHTTP() []string
// EndpointsV3 - exposes connection points for client v3.
// EndpointsGRPC - exposes connection points for client v3.
// Calls to this method might initialize the cluster.
EndpointsV3() []string
EndpointsGRPC() []string
// Cluster - calls to this method might initialize the cluster.
Cluster() *integration.Cluster
@ -100,11 +100,11 @@ func (lc *lazyCluster) Terminate() {
}
}
func (lc *lazyCluster) EndpointsV2() []string {
func (lc *lazyCluster) EndpointsHTTP() []string {
return []string{lc.Cluster().Members[0].URL()}
}
func (lc *lazyCluster) EndpointsV3() []string {
func (lc *lazyCluster) EndpointsGRPC() []string {
return lc.Cluster().Client(0).Endpoints()
}