From 4ceedffe863aaa14b7b8fe365f64477f2eff18be Mon Sep 17 00:00:00 2001 From: "Gregory G. Tseng" Date: Thu, 26 May 2016 14:39:44 -0700 Subject: [PATCH] Unexport testing constant --- retrieval/target_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/retrieval/target_test.go b/retrieval/target_test.go index dbbb8f02b..0e01c1c53 100644 --- a/retrieval/target_test.go +++ b/retrieval/target_test.go @@ -32,7 +32,7 @@ import ( ) const ( - CAFilePath = "testdata/ca.cer" + caCertPath = "testdata/ca.cer" ) func TestTargetLabels(t *testing.T) { @@ -239,7 +239,7 @@ func TestNewHTTPCACert(t *testing.T) { cfg := &config.ScrapeConfig{ ScrapeTimeout: model.Duration(1 * time.Second), TLSConfig: config.TLSConfig{ - CAFile: CAFilePath, + CAFile: caCertPath, }, } c, err := newHTTPClient(cfg) @@ -272,7 +272,7 @@ func TestNewHTTPClientCert(t *testing.T) { cfg := &config.ScrapeConfig{ ScrapeTimeout: model.Duration(1 * time.Second), TLSConfig: config.TLSConfig{ - CAFile: CAFilePath, + CAFile: caCertPath, CertFile: "testdata/client.cer", KeyFile: "testdata/client.key", }, @@ -303,7 +303,7 @@ func TestNewHTTPWithServerName(t *testing.T) { cfg := &config.ScrapeConfig{ ScrapeTimeout: model.Duration(1 * time.Second), TLSConfig: config.TLSConfig{ - CAFile: CAFilePath, + CAFile: caCertPath, ServerName: "prometheus.rocks", }, } @@ -333,7 +333,7 @@ func TestNewHTTPWithBadServerName(t *testing.T) { cfg := &config.ScrapeConfig{ ScrapeTimeout: model.Duration(1 * time.Second), TLSConfig: config.TLSConfig{ - CAFile: CAFilePath, + CAFile: caCertPath, ServerName: "badname", }, } @@ -350,7 +350,7 @@ func TestNewHTTPWithBadServerName(t *testing.T) { func newTLSConfig(certName string, t *testing.T) *tls.Config { tlsConfig := &tls.Config{} caCertPool := x509.NewCertPool() - caCert, err := ioutil.ReadFile(CAFilePath) + caCert, err := ioutil.ReadFile(caCertPath) if err != nil { t.Fatalf("Couldn't set up TLS server: %v", err) }