mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
@@ -32,7 +32,7 @@ func TestEtcdCache(t *testing.T) {
|
||||
}
|
||||
defer ex.Stop()
|
||||
|
||||
etc := etcdMiddleware()
|
||||
etc := etcdPlugin()
|
||||
log.SetOutput(ioutil.Discard)
|
||||
|
||||
var ctx = context.TODO()
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
func etcdMiddleware() *etcd.Etcd {
|
||||
func etcdPlugin() *etcd.Etcd {
|
||||
etcdCfg := etcdc.Config{
|
||||
Endpoints: []string{"http://localhost:2379"},
|
||||
}
|
||||
@@ -53,7 +53,7 @@ func TestEtcdStubAndProxyLookup(t *testing.T) {
|
||||
}
|
||||
defer ex.Stop()
|
||||
|
||||
etc := etcdMiddleware()
|
||||
etc := etcdPlugin()
|
||||
log.SetOutput(ioutil.Discard)
|
||||
|
||||
var ctx = context.TODO()
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
// and check if it is really there, but running coredns -plugins.
|
||||
|
||||
// Dangerous test as it messes with your git tree, maybe use tag?
|
||||
func testExternalMiddlewareCompile(t *testing.T) {
|
||||
if err := addExampleMiddleware(); err != nil {
|
||||
func testExternalPluginCompile(t *testing.T) {
|
||||
if err := addExamplePlugin(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer run(t, gitReset)
|
||||
@@ -50,7 +50,7 @@ func run(t *testing.T, c *exec.Cmd) ([]byte, error) {
|
||||
|
||||
}
|
||||
|
||||
func addExampleMiddleware() error {
|
||||
func addExamplePlugin() error {
|
||||
f, err := os.OpenFile("../plugin.cfg", os.O_APPEND|os.O_WRONLY, os.ModeAppend)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user