test: Remove separation between V2 and V3 cluster in integration tests

This commit is contained in:
Marek Siarkowicz
2022-01-18 17:22:40 +01:00
parent 7b365e48d3
commit 264fdbb6a1
51 changed files with 390 additions and 406 deletions

View File

@ -43,7 +43,7 @@ type LazyCluster interface {
EndpointsV3() []string
// Cluster - calls to this method might initialize the cluster.
Cluster() *integration.ClusterV3
Cluster() *integration.Cluster
// Transport - call to this method might initialize the cluster.
Transport() *http.Transport
@ -55,7 +55,7 @@ type LazyCluster interface {
type lazyCluster struct {
cfg integration.ClusterConfig
cluster *integration.ClusterV3
cluster *integration.Cluster
transport *http.Transport
once sync.Once
tb testutil.TB
@ -82,7 +82,7 @@ func (lc *lazyCluster) mustLazyInit() {
if err != nil {
log.Fatal(err)
}
lc.cluster = integration.NewClusterV3(lc.tb, &lc.cfg)
lc.cluster = integration.NewCluster(lc.tb, &lc.cfg)
})
}
@ -106,7 +106,7 @@ func (lc *lazyCluster) EndpointsV3() []string {
return lc.Cluster().Client(0).Endpoints()
}
func (lc *lazyCluster) Cluster() *integration.ClusterV3 {
func (lc *lazyCluster) Cluster() *integration.Cluster {
lc.mustLazyInit()
return lc.cluster
}