mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
config: adapt unit tests
This commit is contained in:
parent
b24602f713
commit
2e18c81a00
|
@ -235,14 +235,12 @@ var expectedConf = &Config{
|
||||||
|
|
||||||
KubernetesSDConfigs: []*KubernetesSDConfig{
|
KubernetesSDConfigs: []*KubernetesSDConfig{
|
||||||
{
|
{
|
||||||
APIServers: []URL{kubernetesSDHostURL()},
|
APIServer: kubernetesSDHostURL(),
|
||||||
Role: KubernetesRoleEndpoint,
|
Role: KubernetesRoleEndpoint,
|
||||||
BasicAuth: &BasicAuth{
|
BasicAuth: &BasicAuth{
|
||||||
Username: "myusername",
|
Username: "myusername",
|
||||||
Password: "mypassword",
|
Password: "mypassword",
|
||||||
},
|
},
|
||||||
RequestTimeout: model.Duration(10 * time.Second),
|
|
||||||
RetryInterval: model.Duration(1 * time.Second),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
3
config/testdata/conf.good.yml
vendored
3
config/testdata/conf.good.yml
vendored
|
@ -116,8 +116,7 @@ scrape_configs:
|
||||||
|
|
||||||
kubernetes_sd_configs:
|
kubernetes_sd_configs:
|
||||||
- role: endpoint
|
- role: endpoint
|
||||||
api_servers:
|
api_server: 'https://localhost:1234'
|
||||||
- 'https://localhost:1234'
|
|
||||||
|
|
||||||
basic_auth:
|
basic_auth:
|
||||||
username: 'myusername'
|
username: 'myusername'
|
||||||
|
|
|
@ -3,8 +3,7 @@ scrape_configs:
|
||||||
|
|
||||||
kubernetes_sd_configs:
|
kubernetes_sd_configs:
|
||||||
- role: node
|
- role: node
|
||||||
api_servers:
|
api_server: 'https://localhost:1234'
|
||||||
- 'https://localhost:1234'
|
|
||||||
|
|
||||||
bearer_token: 1234
|
bearer_token: 1234
|
||||||
bearer_token_file: somefile
|
bearer_token_file: somefile
|
||||||
|
|
|
@ -3,8 +3,7 @@ scrape_configs:
|
||||||
|
|
||||||
kubernetes_sd_configs:
|
kubernetes_sd_configs:
|
||||||
- role: pod
|
- role: pod
|
||||||
api_servers:
|
api_server: 'https://localhost:1234'
|
||||||
- 'https://localhost:1234'
|
|
||||||
|
|
||||||
bearer_token: 1234
|
bearer_token: 1234
|
||||||
basic_auth:
|
basic_auth:
|
||||||
|
|
Loading…
Reference in a new issue