@@ -22,6 +22,7 @@ import (
2222
2323 "github.com/argoproj-labs/argocd-operator/common"
2424 "github.com/argoproj-labs/argocd-operator/controllers/argoutil"
25+ tlsProfile "github.com/argoproj-labs/argocd-operator/pkg/tlsprofile"
2526
2627 "github.com/google/go-cmp/cmp"
2728 "github.com/stretchr/testify/assert"
@@ -3140,21 +3141,21 @@ func TestReconcileArgoCD_reconcileRedisDeployment_customLabelsAndAnnotations(t *
31403141func TestBuildRedisArgs (t * testing.T ) {
31413142 tests := []struct {
31423143 name string
3143- centralTLS TLSConfigProfile
3144+ centralTLS tlsProfile. TLSConfigProfile
31443145 expected []string
31453146 wantErr bool
31463147 }{
31473148 {
31483149 name : "central TLS config with invalid min version" ,
3149- centralTLS : TLSConfigProfile {
3150+ centralTLS : tlsProfile. TLSConfigProfile {
31503151 MinVersion : configv1 .TLSProtocolVersion ("INVALID" ),
31513152 },
31523153 expected : nil ,
31533154 wantErr : false ,
31543155 },
31553156 {
31563157 name : "central TLS config with tls 1.2" ,
3157- centralTLS : TLSConfigProfile {
3158+ centralTLS : tlsProfile. TLSConfigProfile {
31583159 MinVersion : configv1 .VersionTLS12 ,
31593160 Ciphers : []string {
31603161 "ECDHE-RSA-AES128-GCM-SHA256" ,
@@ -3172,7 +3173,7 @@ func TestBuildRedisArgs(t *testing.T) {
31723173 },
31733174 {
31743175 name : "central TLS config with tls 1.3" ,
3175- centralTLS : TLSConfigProfile {
3176+ centralTLS : tlsProfile. TLSConfigProfile {
31763177 MinVersion : configv1 .VersionTLS13 ,
31773178 Ciphers : []string {
31783179 "TLS_AES_128_GCM_SHA256" ,
@@ -3188,7 +3189,7 @@ func TestBuildRedisArgs(t *testing.T) {
31883189 },
31893190 {
31903191 name : "central TLS config only version" ,
3191- centralTLS : TLSConfigProfile {
3192+ centralTLS : tlsProfile. TLSConfigProfile {
31923193 MinVersion : configv1 .VersionTLS12 ,
31933194 },
31943195 expected : []string {
@@ -3199,7 +3200,7 @@ func TestBuildRedisArgs(t *testing.T) {
31993200 },
32003201 {
32013202 name : "central TLS config only ciphers" ,
3202- centralTLS : TLSConfigProfile {
3203+ centralTLS : tlsProfile. TLSConfigProfile {
32033204 Ciphers : []string {
32043205 "ECDHE-RSA-AES256-GCM-SHA384" ,
32053206 },
@@ -3214,7 +3215,7 @@ func TestBuildRedisArgs(t *testing.T) {
32143215 },
32153216 {
32163217 name : "central TLS config with unmapped cipher" ,
3217- centralTLS : TLSConfigProfile {
3218+ centralTLS : tlsProfile. TLSConfigProfile {
32183219 MinVersion : configv1 .VersionTLS12 ,
32193220 Ciphers : []string {
32203221 "INVALID" ,
@@ -3241,21 +3242,21 @@ func TestBuildRedisArgs(t *testing.T) {
32413242func TestBuildTLSArgs (t * testing.T ) {
32423243 tests := []struct {
32433244 name string
3244- centralTLS TLSConfigProfile
3245+ centralTLS tlsProfile. TLSConfigProfile
32453246 expected []string
32463247 wantErr bool
32473248 }{
32483249 {
32493250 name : "disable central tls config" ,
3250- centralTLS : TLSConfigProfile {
3251+ centralTLS : tlsProfile. TLSConfigProfile {
32513252 DisableClusterTLSProfile : true ,
32523253 },
32533254 expected : nil ,
32543255 wantErr : false ,
32553256 },
32563257 {
32573258 name : "central TLS config with min version only" ,
3258- centralTLS : TLSConfigProfile {
3259+ centralTLS : tlsProfile. TLSConfigProfile {
32593260 MinVersion : configv1 .VersionTLS12 ,
32603261 },
32613262 expected : []string {
@@ -3266,7 +3267,7 @@ func TestBuildTLSArgs(t *testing.T) {
32663267 },
32673268 {
32683269 name : "central TLS config with ciphers only" ,
3269- centralTLS : TLSConfigProfile {
3270+ centralTLS : tlsProfile. TLSConfigProfile {
32703271 Ciphers : []string {
32713272 "ECDHE-RSA-AES128-GCM-SHA256" ,
32723273 },
@@ -3279,7 +3280,7 @@ func TestBuildTLSArgs(t *testing.T) {
32793280 },
32803281 {
32813282 name : "central TLS config with version and ciphers" ,
3282- centralTLS : TLSConfigProfile {
3283+ centralTLS : tlsProfile. TLSConfigProfile {
32833284 MinVersion : configv1 .VersionTLS13 ,
32843285 Ciphers : []string {
32853286 "TLS_AES_128_GCM_SHA256" ,
@@ -3315,7 +3316,7 @@ func TestArgoCDServerAndRepoServerDeploymentArgs(t *testing.T) {
33153316 sch := makeTestReconcilerScheme (argoproj .AddToScheme )
33163317 cl := makeTestReconcilerClient (sch , resObjs , subresObjs , runtimeObjs )
33173318 r := makeTestReconciler (cl , sch , testclient .NewSimpleClientset ())
3318- r .CentralTLSConfigProfile = TLSConfigProfile {
3319+ r .CentralTLSConfigProfile = tlsProfile. TLSConfigProfile {
33193320 DisableClusterTLSProfile : false ,
33203321 MinVersion : configv1 .VersionTLS12 ,
33213322 Ciphers : []string {
0 commit comments