Skip to content

Commit 8b51f31

Browse files
committed
reduce sonarcloud issues
Signed-off-by: Atif Ali <[email protected]>
1 parent 5403648 commit 8b51f31

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

pkg/sync/sync_context_test.go

+15-15
Original file line numberDiff line numberDiff line change
@@ -2230,29 +2230,29 @@ Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordina
22302230
{
22312231
name: "multiple volumeClaimTemplate change",
22322232
currentSpec: map[string]interface{}{
2233-
"serviceName": "postgresql-svc",
2233+
"serviceName": postgresqlSvc,
22342234
"selector": map[string]interface{}{
22352235
"matchLabels": map[string]interface{}{
22362236
"app": "postgresql",
22372237
},
22382238
},
22392239
"volumeClaimTemplates": []interface{}{
2240-
templateWithStorage("static-files", "1Gi"),
2241-
templateWithStorage("dexconfig", "1Gi"),
2242-
templateWithStorage("argocd-dex-server-tls", "1Gi"),
2240+
templateWithStorage(staticFiles, "1Gi"),
2241+
templateWithStorage(dexconfig, "1Gi"),
2242+
templateWithStorage(argocdDexServerTLS, "1Gi"),
22432243
},
22442244
},
22452245
desiredSpec: map[string]interface{}{
2246-
"serviceName": "postgresql-svc",
2246+
"serviceName": postgresqlSvc,
22472247
"selector": map[string]interface{}{
22482248
"matchLabels": map[string]interface{}{
22492249
"app": "postgresql",
22502250
},
22512251
},
22522252
"volumeClaimTemplates": []interface{}{
2253-
templateWithStorage("static-files", "2Gi"),
2254-
templateWithStorage("dexconfig", "3Gi"),
2255-
templateWithStorage("argocd-dex-server-tls", "4Gi"),
2253+
templateWithStorage(staticFiles, "2Gi"),
2254+
templateWithStorage(dexconfig, "3Gi"),
2255+
templateWithStorage(argocdDexServerTLS, "4Gi"),
22562256
},
22572257
},
22582258
expectedMessage: `attempting to change immutable fields:
@@ -2271,16 +2271,16 @@ Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordina
22712271
{
22722272
name: "multiple field changes",
22732273
currentSpec: map[string]interface{}{
2274-
"serviceName": "postgresql-svc",
2274+
"serviceName": postgresqlSvc,
22752275
"selector": map[string]interface{}{
22762276
"matchLabels": map[string]interface{}{
22772277
"app": "postgresql",
22782278
},
22792279
},
22802280
"volumeClaimTemplates": []interface{}{
2281-
templateWithStorage("static-files", "1Gi"),
2282-
templateWithStorage("dexconfig", "1Gi"),
2283-
templateWithStorage("argocd-dex-server-tls", "1Gi"),
2281+
templateWithStorage(staticFiles, "1Gi"),
2282+
templateWithStorage(dexconfig, "1Gi"),
2283+
templateWithStorage(argocdDexServerTLS, "1Gi"),
22842284
},
22852285
},
22862286
desiredSpec: map[string]interface{}{
@@ -2291,9 +2291,9 @@ Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordina
22912291
},
22922292
},
22932293
"volumeClaimTemplates": []interface{}{
2294-
templateWithStorage("static-files", "2Gi"),
2295-
templateWithStorage("dexconfig", "1Gi"),
2296-
templateWithStorage("argocd-dex-server-tls", "1Gi"),
2294+
templateWithStorage(staticFiles, "2Gi"),
2295+
templateWithStorage(dexconfig, "1Gi"),
2296+
templateWithStorage(argocdDexServerTLS, "1Gi"),
22972297
},
22982298
},
22992299
expectedMessage: `attempting to change immutable fields:

0 commit comments

Comments
 (0)