Add missing config test fixtures.

pull/80/head
Julius Volz 12 years ago
parent db5868f1b3
commit 39411b516d

@ -30,16 +30,16 @@ var configTests = []struct {
errContains string
}{
{
inputFile: "minimal.conf",
inputFile: "minimal.conf.input",
printedFile: "minimal.conf.printed",
}, {
inputFile: "sample.conf",
inputFile: "sample.conf.input",
printedFile: "sample.conf.printed",
}, {
// TODO: Options that are not provided should be set to sane defaults or
// create errors during config loading (as appropriate). Right now, these
// options remain at their zero-values, which is probably not what we want.
inputFile: "empty.conf",
inputFile: "empty.conf.input",
printedFile: "empty.conf.printed",
},
// TODO: To enable testing of bad configs, we first need to change config
@ -47,7 +47,7 @@ var configTests = []struct {
// configuration error should be passed back all the way to the caller.
//
//{
// inputFile: "bad_job_option.conf",
// inputFile: "bad_job_option.conf.input",
// shouldFail: true,
// errContains: "Missing job name",
//},

@ -0,0 +1,21 @@
global {
scrape_interval = "30s"
evaluation_interval = "30s"
labels {
monitor = "test"
}
rule_files = [
"prometheus.rules"
]
}
job {
jobname = "prometheus"
scrape_interval = "15s"
targets {
endpoints = [
"http://localhost:9090/metrics.json"
]
}
}

@ -0,0 +1,21 @@
global {
scrape_interval = "30s"
evaluation_interval = "30s"
labels {
monitor = "test"
}
rule_files = [
"prometheus.rules"
]
}
job {
name = "prometheus"
scrape_interval = "15s"
targets {
endpoints = [
"http://localhost:9090/metrics.json"
]
}
}

@ -0,0 +1,51 @@
global {
scrape_interval = "30s"
evaluation_interval = "30s"
labels {
monitor = "test"
}
rule_files = [
"prometheus.rules"
]
}
job {
name = "prometheus"
scrape_interval = "15s"
targets {
endpoints = [
"http://localhost:9090/metrics.json"
]
labels {
group = "canary"
}
}
}
job {
name = "random"
scrape_interval = "30s"
targets {
endpoints = [
"http://random.com:8080/metrics.json",
"http://random.com:8081/metrics.json",
"http://random.com:8082/metrics.json",
"http://random.com:8083/metrics.json",
"http://random.com:8084/metrics.json"
]
labels {
group = "production"
}
}
targets {
endpoints = [
"http://random.com:8085/metrics.json",
"http://random.com:8086/metrics.json"
]
labels {
group = "canary"
}
}
}
Loading…
Cancel
Save