chore: simplify provider GetConnection

This commit is contained in:
Quentin McGaw
2022-04-19 14:28:57 +00:00
parent 306d8494d6
commit 0c0f1663b1
36 changed files with 243 additions and 707 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
)
func Test_GetProtocol(t *testing.T) {
func Test_getProtocol(t *testing.T) {
t.Parallel()
testCases := map[string]struct {
@@ -50,14 +50,14 @@ func Test_GetProtocol(t *testing.T) {
t.Run(name, func(t *testing.T) {
t.Parallel()
protocol := GetProtocol(testCase.selection)
protocol := getProtocol(testCase.selection)
assert.Equal(t, testCase.protocol, protocol)
})
}
}
func Test_FilterByProtocol(t *testing.T) {
func Test_filterByProtocol(t *testing.T) {
t.Parallel()
testCases := map[string]struct {
@@ -127,7 +127,7 @@ func Test_FilterByProtocol(t *testing.T) {
t.Run(name, func(t *testing.T) {
t.Parallel()
filtered := FilterByProtocol(testCase.selection,
filtered := filterByProtocol(testCase.selection,
testCase.serverTCP, testCase.serverUDP)
assert.Equal(t, testCase.filtered, filtered)