aboutsummaryrefslogtreecommitdiff
path: root/test/metrics_test.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 1-4/+4
* Rename middleware to plugin first pass; mostly used 'sed', few spots where I manually changed text. This still builds a coredns binary. * fmt error * Rename AddMiddleware to AddPlugin * Readd AddMiddleware to remain backwards compat
2017-08-24tests: CoreDNSServerAndPorts (#972)Gravatar Miek Gieben 1-3/+1
* tests: CoreDNSServerAndPorts Copy from kubernetes.go and renamed to fit the style, adapted almost all callers. This is a mechanicl change, no testdata was changed. * typos
2017-02-22Fix import path `github.com/miekg/coredns` -> `github.com/coredns/coredns` ↵Gravatar Yong Tang 1-4/+4
(#547) This fix fixes import path from `github.com/miekg/coredns` -> `github.com/coredns/coredns`
2017-01-12Run tests in parallel (#478)Gravatar Miek Gieben 1-0/+2
Create a small speedup running the tests: PASS ok github.com/miekg/coredns/test 10.329s PASS ok github.com/miekg/coredns/test 6.079s Skip the etcd ones. Doing the middleware/*/*_test ones doesn't yield any speedup as these are still done on a per directory basis.
2016-11-05Disable metrics test (#380)Gravatar Miek Gieben 1-4/+5
Disable this test (for now), it fails weirdly on travis (and not locally). Initial suspicion that another server is still reporting (or something). Anyway hard to replicate locally - disable it for now.
2016-10-31Add metrics for cache hits/misses (#375)Gravatar Ben Kochie 1-4/+18
* Add metrics for cache hits/misses Add counters for cache middleware hits and misses. * Add test for cache middleware hit/miss counters. * Fix cache hit metric incrementing. * Add cache hit/miss metrics to dnssec middleware. * Update README metric documentation.
2016-10-30middleware/cache: fix metrics testGravatar Miek Gieben 1-2/+2
Fix the metrics test, top-level test directory still referenced the old metrics name.
2016-10-28middleware/metrics: export ListenAddr (#366)Gravatar Miek Gieben 1-10/+9
ListenAddr is the address where the prometheus metric are exported. This can be used in tests to listen on "localhost:0" and then later retrieve the metrics from there. It makes the tests indepent on each other.
2016-10-26middleware/metrics: cleanup (#355)Gravatar Miek Gieben 1-3/+159
* middleware/metrics: add more metrics middleware/cache: Add metrics for number of elements in the cache. Also export the total size. Update README to detail the new metrics. middleware/metrics Move metrics into subpackage called "vars". This breaks the import cycle and is cleaner. This allows vars.Report to be used in the the dnsserver to log refused queries. middleware/metrics: tests Add tests to the metrics framework. The metrics/test subpackage allows scraping of the local server. Do a few test scrape of the metrics that are defined in the metrics middleware. This also allows metrics integration tests to check if the caching and dnssec middleware export their metrics correctly. * update README * typos * fix tests
2016-10-04middleware/metrics: fix crash on startup (#318)Gravatar Miek Gieben 1-0/+17
Make the methods that handle Metrics all use pointer receivers to fix sync.Once not being initialized. Finish the setup_test to test for failures. And make the check for the address more strict and return an error when it does not have a port number. Add a toplevel test that starts a CoreDNS server with metrics enabled so we catch these errors in the future.