Add TLS conf for Go1.7

This commit is contained in:
Klaus Ma 2016-12-24 15:36:45 +08:00
parent 24b3f6c494
commit 3bfe14b316

View File

@ -23,6 +23,8 @@ import (
"net/url"
"os"
"reflect"
"runtime"
"strings"
"testing"
"k8s.io/kubernetes/pkg/util/sets"
@ -52,8 +54,6 @@ func TestCloneTLSConfig(t *testing.T) {
// These fields are not copied
"SessionTicketsDisabled",
"SessionTicketKey",
"DynamicRecordSizingDisabled",
"Renegotiation",
// These fields are unexported
"serverInitOnce",
@ -61,6 +61,11 @@ func TestCloneTLSConfig(t *testing.T) {
"sessionTicketKeys",
)
// See #33936.
if strings.HasPrefix(runtime.Version(), "go1.7") {
expected.Insert("DynamicRecordSizingDisabled", "Renegotiation")
}
fields := sets.NewString()
structType := reflect.TypeOf(tls.Config{})
for i := 0; i < structType.NumField(); i++ {