From c8ad147c0ae833603e9aba1374018481629584ed Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 30 Aug 2016 20:52:14 -0700 Subject: [PATCH] e2e: remove stripSchema --- e2e/ctl_v3_test.go | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/e2e/ctl_v3_test.go b/e2e/ctl_v3_test.go index 59fa8f2b5..b390e1760 100644 --- a/e2e/ctl_v3_test.go +++ b/e2e/ctl_v3_test.go @@ -146,15 +146,7 @@ func (cx *ctlCtx) PrefixArgs() []string { panic("v3 proxy not implemented") } - endpoints := "" - if backends := cx.epc.backends(); len(backends) != 0 { - es := []string{} - for _, b := range backends { - es = append(es, stripSchema(b.cfg.acurl)) - } - endpoints = strings.Join(es, ",") - } - cmdArgs := []string{ctlBinPath, "--endpoints", endpoints, "--dial-timeout", cx.dialTimeout.String()} + cmdArgs := []string{ctlBinPath, "--endpoints", strings.Join(cx.epc.grpcEndpoints(), ","), "--dial-timeout", cx.dialTimeout.String()} if cx.epc.cfg.clientTLS == clientTLS { if cx.epc.cfg.isClientAutoTLS { cmdArgs = append(cmdArgs, "--insecure-transport=false", "--insecure-skip-tls-verify") @@ -173,13 +165,3 @@ func (cx *ctlCtx) PrefixArgs() []string { func isGRPCTimedout(err error) bool { return strings.Contains(err.Error(), "grpc: timed out trying to connect") } - -func stripSchema(s string) string { - if strings.HasPrefix(s, "http://") { - s = strings.Replace(s, "http://", "", -1) - } - if strings.HasPrefix(s, "https://") { - s = strings.Replace(s, "https://", "", -1) - } - return s -}