Add github testing workflow, simplify the Makefile because that was
complex because of Travis. Remove the fuzzing, needs to be re-added when
that works properly with go modules (it has been disabled for quite some
time). Multiple builds and files have been added so these tests can all
run in parallel. Our testing now tests a couple of minutes, the codeql
is by far the more expensive.
Move metric's naming test to test/presubmit_test.go
Add longer sleep in the TestAutoAXFR.
Bye bye travis!
Closes: #4266
Signed-off-by: Miek Gieben <miek@miek.nl>
This ports the shell presubmit to Go and makes them better; esp the
Errorf/Logf/Fatalf one because it actually parses the code and works of
the AST.
These error will now show up in the travis/circle CI runs where they
belong.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Makefiles: remove GO111MODULE
This is the default in 1.13 it can be removed; also make the test out
log less, so failure are more pronounced in the travis out, hide
coverage stats for instance.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Kill -v as wel
Signed-off-by: Miek Gieben <miek@miek.nl>
This feature introduce continuous fuzzing with the following
features:
* Ruzzing: fuzz-targets are run continuously on master
( the fuzzers are updated every time new code is pushed to master)
* Regresion: In addition to unit-tests travis runs all fuzz
targets through the generated corpus to catch bugs early on
in the CI process before merge.
* Remove etcd unit testing from travis
Remove these from the travis unit testing. (to speed up travis)
See #2671
Signed-off-by: Miek Gieben <miek@miek.nl>
* Add build tag
Signed-off-by: Miek Gieben <miek@miek.nl>
* Upgrade caddy to 0.11.2
Redo of #2505 (cherry-picked commit)
Signed-off-by: Miek Gieben <miek@miek.nl>
* .4 has been released
Signed-off-by: Miek Gieben <miek@miek.nl>
* Fix EDNS0 compliance
Do SizeAndDo in the server (ScrubWriter) and remove all uses of this
from the plugins. Also *always* do it. This is to get into compliance
for https://dnsflagday.net/.
The pkg/edns0 now exports the EDNS0 options we understand; this is
exported to allow plugins add things there. The *rewrite* plugin used
this to add custom EDNS0 option codes that the server needs to
understand.
This also needs a new release of miekg/dns because it triggered a
race-condition that was basicly there forever.
See:
* https://github.com/miekg/dns/issues/857
* https://github.com/miekg/dns/pull/859
Running a test instance and pointing the https://ednscomp.isc.org/ednscomp
to it shows the tests are now fixed:
~~~
EDNS Compliance Tester
Checking: 'miek.nl' as at 2018-12-01T17:53:15Z
miek.nl. @147.75.204.203 (drone.coredns.io.): dns=ok edns=ok edns1=ok edns@512=ok ednsopt=ok edns1opt=ok do=ok ednsflags=ok docookie=ok edns512tcp=ok optlist=ok
miek.nl. @2604:1380:2002:a000::1 (drone.coredns.io.): dns=ok edns=ok edns1=ok edns@512=ok ednsopt=ok edns1opt=ok do=ok ednsflags=ok docookie=ok edns512tcp=ok optlist=ok
All Ok
Codes
ok - test passed.
~~~
Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
* typos in comments
Signed-off-by: Miek Gieben <miek@miek.nl>
Upgrade to new dns lib version; that saw multiple improvements; some
patch releases are in the pipeline.
The big thing here is the removal of ErrTruncated, so we need to deal
with this slightly different in the forward plugin. It removed the
entire truncated.go logic and just checks the message for .Truncated (if
there is a message) and retries with tcp.
Signed-off-by: Miek Gieben <miek@miek.nl>
* plugin/file: Use new zone parser API
Use new dns lib 1.0.14 and default to using the new zone parser that
does not leak go-routines.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Use new API
Signed-off-by: Miek Gieben <miek@miek.nl>
Update Caddy to v0.10.13 so that environment variables may be used after
Go template (e.g. in template's answer). v0.11.0 has been released, but
v0.10.13 is a smaller set of changes and has the necessary fix.
Fixes#2153
The exit code wasn't properly acted upon in the makefile.
Make filename-hyphen actually return an non-zero exit code.
Signed-off-by: Miek Gieben <miek@miek.nl>
This downloads gometalinter (which is now breaking in the CI tests).
Also the goimports target is run with ||true, so nothing will break
if this flags anything (done because of gofmt changes in between
release).
Probably I will setup something to use github's linter API:
https://github.com/markstory/lint-review
Signed-off-by: Miek Gieben <miek@miek.nl>
Correctly set the path for the presubmits, fix some typos and make
the goimport target do the linting to the lint target can be removed.
Also don't make it a fatal error because gofmt changes between releases.
While invoking `make check` from a fresh new environment
the following failure occured:
```
[ec2-user@..... coredns]$ docker run -i -t --rm -v $PWD:/go/src/github.com/coredns/coredns -w /go/src/github.com/coredns/coredns golang:1.10
root@e2d6a6c17132:/go/src/github.com/coredns/coredns# make check
** presubmit/context
** presubmit/test-lowercase
( gometalinter --deadline=2m --disable-all --enable=goimports --vendor --exclude=^pb/ ./... || true )
/bin/sh: 1: gometalinter: not found
go generate coredns.go
```
This fix fixes the issue in Makefile so that deps could be installed first.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* vendor: don't vendor the context stuff
We don't need to vendor this anymore as we moved to the std lib for
these.
* new stuff showing up with dep ensure
* remove go-shlex
* build: add presubmits
We didn't have a way to encode presubmit; with this hack we can just
run a bunch of script on the build; this allows us to automatically
capture things like using the wrong context and maybe other fluff.
This allows us to cut down on code reviews and just have the build fail.
* hook it up
* put presubmit in checks; so we do it for tests as well
* Add explicit exit 1 if things fails
This fix updates go dep with `dep ensure --update` as well as the following:
- Removed github.com/ugorji/go restriction in Gopkg.toml (fixes #1557)
- Added github.com/flynn/go-shlex in Makefile (neede by Caddy, maybe removed later)
This fix fixes#1557
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>