diff --git a/clients/backend_test.go b/clients/backend_test.go index b022dcf..8efc6f0 100644 --- a/clients/backend_test.go +++ b/clients/backend_test.go @@ -34,7 +34,7 @@ var _ = Describe("Backend", func() { httpTrans, ok := client.Transport.(*http.Transport) Expect(ok).To(BeTrue()) - Expect(httpTrans.TLSClientConfig.ServerName).To(Equal("my.san")) + Expect(httpTrans.TLSClientConfig.ServerName).To(Equal("")) Expect(httpTrans.MaxIdleConns).To(Equal(100)) Expect(httpTrans.MaxIdleConnsPerHost).To(Equal(100)) }) diff --git a/scrapers/scrape_test.go b/scrapers/scrape_test.go index 77fea32..2f1e82a 100644 --- a/scrapers/scrape_test.go +++ b/scrapers/scrape_test.go @@ -3,8 +3,10 @@ package scrapers_test import ( "fmt" "io/ioutil" + "net" "net/http" "net/url" + "strconv" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -51,12 +53,18 @@ var _ = Describe("Scraper", func() { }) It("scrapes metrics from an app", func() { + host, portStr, err := net.SplitHostPort(serverURL.Host) + Expect(err).ShouldNot(HaveOccurred()) + port, err := strconv.Atoi(portStr) + Expect(err).ShouldNot(HaveOccurred()) route := &models.Route{ - ID: "a758f25d-2d01-419e-b63b-de3aabcd9e15", - Address: serverURL.Host, + ID: "a758f25d-2d01-419e-b63b-de3aabcd9e15", + Address: host, + ServiceAddress: host, + ServicePort: port, } - resp, err := scraper.Scrape(route, "", "http", http.Header{}) + resp, err := scraper.Scrape(route, "/metrics", "http", http.Header{}) Expect(err).ShouldNot(HaveOccurred()) defer resp.Close()