<commit_before>package tls_test

import (
	"testing"

	"crypto/tls"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"strings"
	"time"

	"github.com/fastly/go-utils/server"
	ttls "github.com/fastly/go-utils/tls"
)

func NewMockServer() *server.Server {
	addr := ":0" // let kernel assign an unused port
	s, err := server.NewSingleServer(&addr)
	if err != nil {
		log.Panic(err)
		return nil
	}
	return s
}

func TestTLSCacheToProxy(t *testing.T) {
	check(t, "test-cache-client", "test-proxy-server", true)
}<commit_msg>explicitly listen on an IPv4 localhost address<commit_after>package tls_test

import (
	"testing"

	"crypto/tls"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"strings"
	"time"

	"github.com/fastly/go-utils/server"
	ttls "github.com/fastly/go-utils/tls"
)

func NewMockServer() *server.Server {
	addr := "127.0.0.1:0" // let kernel assign an unused port
	s, err := server.NewSingleServer(&addr)
	if err != nil {
		log.Panic(err)
		return nil
	}
	return s
}

func TestTLSCacheToProxy(t *testing.T) {
	check(t, "test-cache-client", "test-proxy-server", true)
}
{'fraction_non_alphanumeric': 0.16095238095238096, 'fraction_numerical': 0.008571428571428572, 'mean_word_length': 3.957547169811321, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4463339', 'n_tokens_mistral': 448, 'n_tokens_neox': 434, 'n_words': 92}