Fix coredns, implement v2

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-06-04 13:36:27 +02:00
parent fafb347966
commit 29acaf739e
7 changed files with 85 additions and 200 deletions

View File

@@ -1,7 +1,6 @@
package traffic
import (
"encoding/json"
"testing"
"github.com/caddyserver/caddy"
@@ -14,17 +13,6 @@ func TestSetup(t *testing.T) {
}
}
func TestLBTxt(t *testing.T) {
for _, txt := range []string{lbTXT} {
if _, err := json.Marshal(txt); err != nil {
t.Errorf("Failed to marshal grpc serverConfig: %s", err)
}
if len(txt) > 255 {
t.Errorf("Too long grpc serverConfig (>255): %d", len(txt))
}
}
}
func TestParseTraffic(t *testing.T) {
tests := []struct {
input string