💄 move getTlsConfig to configuration pkg

This commit is contained in:
Max Lerebourg
2022-12-05 08:10:56 +01:00
parent a17e082ba3
commit 1f094d818a
4 changed files with 75 additions and 76 deletions
-27
View File
@@ -2,7 +2,6 @@ package crowdsec_bouncer_traefik_plugin //nolint:revive,stylecheck
import (
"context"
"crypto/tls"
"net/http"
"net/http/httptest"
"reflect"
@@ -178,29 +177,3 @@ func Test_crowdsecQuery(t *testing.T) {
})
}
}
func Test_getTLSConfigCrowdsec(t *testing.T) {
type args struct {
config *configuration.Config
}
tests := []struct {
name string
args args
want *tls.Config
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := getTLSConfigCrowdsec(tt.args.config)
if (err != nil) != tt.wantErr {
t.Errorf("getTLSConfigCrowdsec() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("getTLSConfigCrowdsec() = %v, want %v", got, tt.want)
}
})
}
}