From 3359e03a8b6abc0142b5e49f2607ececa0a0f9bb Mon Sep 17 00:00:00 2001 From: Duologic Date: Fri, 3 Jul 2020 09:32:40 +0200 Subject: [PATCH] fix: NewExporter only takes project parameter --- main_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main_test.go b/main_test.go index 1eaf9ac..b279435 100644 --- a/main_test.go +++ b/main_test.go @@ -8,7 +8,7 @@ import ( func TestScrape(t *testing.T) { // TestSuccessfulConnection - exporter, _ := NewExporter("credentials.json", os.Getenv("GCP_PROJECT")) + exporter, _ := NewExporter(os.Getenv("GCP_PROJECT")) up, _, _ := exporter.scrape() if up == 0 { t.Errorf("TestSuccessfulConnection: up=%v, expected=1", up) @@ -16,7 +16,7 @@ func TestScrape(t *testing.T) { // TestFailedConnection // Set the project name to "503" since the Google Compute API will append this to the end of the BasePath - exporter, _ = NewExporter("credentials.json", "503") + exporter, _ = NewExporter("503") exporter.service.BasePath = "https://httpbin.org/status/" up, _, _ = exporter.scrape() if up != 0 {