Commit graph

8 commits

Author SHA1 Message Date
Eng Zer Jun
b868350fc2
test: use t.TempDir to create temporary test directory (#6164) 2023-06-17 15:21:01 +02:00
Zou Nengren
5191959bd7
cleanup deprecated package io/ioutil (#4920)
Signed-off-by: zounengren <zouyee1989@gmail.com>
2021-10-13 09:30:31 +02:00
Zhou Hao
f6262eb2f6
cleanup tempfiles for erratic_autopath_test (#4080)
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
2020-08-20 06:11:56 -07:00
Ambrose Chua
ed1f42cf56
Fix mixed indentation within tests (#3855)
Signed-off-by: Ambrose Chua <ambrose@chua.family>
2020-04-25 08:08:36 +02:00
Yong Tang
9dd288943a Move *proxy* to external (#2651)
* Move *proxy* to external

move the proxy plugin into coredns/proxy and remove it as a default
plugin. Link the proxy to deprecated in plugin.cfg

coredns/proxy doesn't compile because of the vendoring :(

Signed-off-by: Miek Gieben <miek@miek.nl>

* Add github.com/coredns/proxy

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-03-04 07:32:38 +00:00
mrasu
643dfd7419 Fix a flaky test by not depending on Google (#2565)
TestLookupAutoPathErratic sometimes fail on TravisCI saying below

```
=== RUN   TestLookupAutoPathErratic
--- FAIL: TestLookupAutoPathErratic (8.30s)
    erratic_autopath_test.go:39: Test 0, failed to sent query: "read udp [::1]:39758->[::1]:56643: i/o timeout"
FAIL
```

The failure happens when Google replies slowly.
This PR changes to not use Google but run CoreDNS locally and proxy to the server.

---

Because the failure depends on Google, sometimes it happens frequently but sometimes it doesn't happen.
I hope following test help you reproduce it.

```
func TestLookupAutoPathErratic2(t *testing.T) {
	for i := 0; i < 200; i++ {
		TestLookupAutoPathErratic(t)
	}
}
```

or I can reproduce it by changing proxy to other DNS like 1.1.1.1 instead of 8.8.8.8 too
2019-02-17 08:33:51 +00:00
Miek Gieben
f901b0cefa tests: CoreDNSServerAndPorts (#972)
* 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-08-24 11:35:14 +01:00
Miek Gieben
cc4e4a0626 mw/autopath: integration test with erratic (#930)
Add integration test with erratic. For this erratic now also returns an
autopath searchpath. This tests the whole chain; i.e registring a
searchfunction and calling that from autopath.

This tests does a autopathing domain and a non-autopathing one.
2017-08-18 12:57:23 +01:00