mirror of
https://github.com/coredns/coredns.git
synced 2025-12-22 18:15:10 -05:00
@@ -1,6 +1,7 @@
|
||||
package traffic
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/caddyserver/caddy"
|
||||
@@ -13,6 +14,16 @@ func TestSetup(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLBTxt(t *testing.T) {
|
||||
_, err := json.Marshal(lbTXT)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to marshal grpc serverConfig: %s", err)
|
||||
}
|
||||
if len(lbTXT) > 255 {
|
||||
t.Fatalf("Too long grpc serverConfig (>255): %d", len(lbTXT))
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseTraffic(t *testing.T) {
|
||||
tests := []struct {
|
||||
input string
|
||||
|
||||
Reference in New Issue
Block a user