From 2e18c81a00555fce569f7d72ed481689bd669b76 Mon Sep 17 00:00:00 2001 From: Frederic Branczyk Date: Mon, 10 Oct 2016 12:42:01 +0200 Subject: [PATCH] config: adapt unit tests --- config/config_test.go | 6 ++---- config/testdata/conf.good.yml | 3 +-- config/testdata/kubernetes_bearertoken.bad.yml | 3 +-- config/testdata/kubernetes_bearertoken_basicauth.bad.yml | 3 +-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/config/config_test.go b/config/config_test.go index 17642f76ce..8cbeab512a 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -235,14 +235,12 @@ var expectedConf = &Config{ KubernetesSDConfigs: []*KubernetesSDConfig{ { - APIServers: []URL{kubernetesSDHostURL()}, - Role: KubernetesRoleEndpoint, + APIServer: kubernetesSDHostURL(), + Role: KubernetesRoleEndpoint, BasicAuth: &BasicAuth{ Username: "myusername", Password: "mypassword", }, - RequestTimeout: model.Duration(10 * time.Second), - RetryInterval: model.Duration(1 * time.Second), }, }, }, diff --git a/config/testdata/conf.good.yml b/config/testdata/conf.good.yml index 14a8436f8a..11569dc2ef 100644 --- a/config/testdata/conf.good.yml +++ b/config/testdata/conf.good.yml @@ -116,8 +116,7 @@ scrape_configs: kubernetes_sd_configs: - role: endpoint - api_servers: - - 'https://localhost:1234' + api_server: 'https://localhost:1234' basic_auth: username: 'myusername' diff --git a/config/testdata/kubernetes_bearertoken.bad.yml b/config/testdata/kubernetes_bearertoken.bad.yml index 533742fd3f..158de9a1d2 100644 --- a/config/testdata/kubernetes_bearertoken.bad.yml +++ b/config/testdata/kubernetes_bearertoken.bad.yml @@ -3,8 +3,7 @@ scrape_configs: kubernetes_sd_configs: - role: node - api_servers: - - 'https://localhost:1234' + api_server: 'https://localhost:1234' bearer_token: 1234 bearer_token_file: somefile diff --git a/config/testdata/kubernetes_bearertoken_basicauth.bad.yml b/config/testdata/kubernetes_bearertoken_basicauth.bad.yml index e7c1633d5c..ad7cc329dc 100644 --- a/config/testdata/kubernetes_bearertoken_basicauth.bad.yml +++ b/config/testdata/kubernetes_bearertoken_basicauth.bad.yml @@ -3,8 +3,7 @@ scrape_configs: kubernetes_sd_configs: - role: pod - api_servers: - - 'https://localhost:1234' + api_server: 'https://localhost:1234' bearer_token: 1234 basic_auth: