Commit graph

4 commits

Author SHA1 Message Date
Miek Gieben
9d736fd754 test: remove -v output of test_readme.go (#1115)
Only output when something is wrong, not by default when you just run
with -v.

Cleans the test output a little.
2017-09-28 09:46:41 +01:00
Miek Gieben
d8714e64e4 Remove the word middleware (#1067)
* 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-09-14 09:36:06 +01:00
Miek Gieben
2785f01db5 core: readme test: new port for every instance (#1056)
Use a new port for every instance.
2017-09-10 20:29:38 +01:00
Miek Gieben
6e3eec1e72 documention: test README snippets (#1043)
If a README has a corefile snippet that is annotated with `corefile`,
this test will parse the instance and checks the snippet is legal.
This means a) we will get better docs b) we know for sure everything
still parses.

The test parses everything in middleware/*/README.md, it does not check
for README presence, just Corefile snippets. The port used is 10053 and
overrides whatever port is set in the docs.

The secondary middleware was used as an example and adds two examples
that should parse.

failures show up as:

~~~
--- FAIL: TestReadme (0.04s)
	readme_test.go:50: Testing ../middleware/secondary/README.md, with 100 byte snippet
	readme_test.go:50: Testing ../middleware/secondary/README.md, with 93 byte snippet
	readme_test.go:53: Failed to start server for input "middleware/secondary: Corefile:3 - Error during parsing: unknown property 'transfeT'":
		. {
		    secondary example.net {
		        transfeT from 10.1.2.1
		        transfer to *
		    }
		}
FAIL
~~~
2017-09-10 19:52:15 +01:00