@@ -105,9 +105,8 @@ func (s *ConstraintTemplateTest) TestSecondaryStorageConstraint() {
105105 {
106106 Name : "TestSecondaryStorageConstraintFailsWhenOrchestrationEnabledAndNoStorageConfigured" ,
107107 Values : map [string ]string {
108- "orchestration.enabled" : "true" ,
109- "global.elasticsearch.enabled" : "false" ,
110- "global.opensearch.enabled" : "false" ,
108+ "orchestration.enabled" : "true" ,
109+ "orchestration.data.secondaryStorage.type" : "" ,
111110 },
112111 Verifier : func (t * testing.T , output string , err error ) {
113112 s .Require ().ErrorContains (err , "Please configure an expected secondary storage type under `orchestration.data.secondaryStorage.type`" )
@@ -116,42 +115,38 @@ func (s *ConstraintTemplateTest) TestSecondaryStorageConstraint() {
116115 {
117116 Name : "TestSecondaryStorageConstraintDoesNotFireWhenOrchestrationDisabled" ,
118117 Values : map [string ]string {
119- "orchestration.enabled" : "false" ,
120- "global.elasticsearch.enabled" : "false" ,
121- "global.opensearch.enabled" : "false" ,
118+ "orchestration.enabled" : "false" ,
119+ "orchestration.data.secondaryStorage.type" : "" ,
122120 },
123121 Verifier : func (t * testing.T , output string , err error ) {
124122 s .Require ().Nil (err )
125123 },
126124 },
127125 {
128- Name : "TestSecondaryStorageConstraintDoesNotFireWhenElasticsearchEnabled " ,
126+ Name : "TestSecondaryStorageConstraintDoesNotFireForElasticsearch " ,
129127 Values : map [string ]string {
130- "orchestration.enabled" : "true" ,
131- "global.elasticsearch.enabled " : "true " ,
128+ "orchestration.enabled" : "true" ,
129+ "orchestration.data.secondaryStorage.type " : "elasticsearch " ,
132130 },
133131 Verifier : func (t * testing.T , output string , err error ) {
134132 s .Require ().Nil (err )
135133 },
136134 },
137135 {
138- Name : "TestSecondaryStorageConstraintDoesNotFireWhenOpensearchEnabled " ,
136+ Name : "TestSecondaryStorageConstraintDoesNotFireForOpenSearch " ,
139137 Values : map [string ]string {
140- "orchestration.enabled" : "true" ,
141- "global.elasticsearch.enabled" : "false" ,
142- "global.opensearch.enabled" : "true" ,
138+ "orchestration.enabled" : "true" ,
139+ "orchestration.data.secondaryStorage.type" : "opensearch" ,
143140 },
144141 Verifier : func (t * testing.T , output string , err error ) {
145142 s .Require ().Nil (err )
146143 },
147144 },
148145 {
149- Name : "TestSecondaryStorageConstraintDoesNotFireWhenStorageTypeExplicitlySet " ,
146+ Name : "TestSecondaryStorageConstraintDoesNotFireForRDBMS " ,
150147 Values : map [string ]string {
151148 "orchestration.enabled" : "true" ,
152- "orchestration.data.secondaryStorage.type" : "elasticsearch" ,
153- "global.elasticsearch.enabled" : "false" ,
154- "global.opensearch.enabled" : "false" ,
149+ "orchestration.data.secondaryStorage.type" : "rdbms" ,
155150 },
156151 Verifier : func (t * testing.T , output string , err error ) {
157152 s .Require ().Nil (err )
@@ -289,7 +284,7 @@ func (s *ConstraintTemplateTest) TestHelmVersionConstraint() {
289284// `helm template` (the framework these tests use), so warning-content
290285// assertions live only in manual `helm install --dry-run` / production
291286// install verification — same constraint that applies to the existing
292- // global.elasticsearch.tls. secret and Bitnami subchart deprecation
287+ // datastore TLS secret and Bitnami subchart deprecation
293288// warnings.
294289func (s * ConstraintTemplateTest ) TestLegacyJksTruststoreFieldsRenderWithoutCrash () {
295290 testCases := []testhelpers.TestCase {
@@ -331,72 +326,6 @@ func (s *ConstraintTemplateTest) TestLegacyJksTruststoreFieldsRenderWithoutCrash
331326 s .Require ().Nil (err )
332327 },
333328 },
334- {
335- // Minimal config: only existingSecret set, existingSecretKey defaults to "".
336- // Pins the round-2 P1 fix: deprecation gate must fire on existingSecret-only,
337- // not require both fields (which the old hasSecretConfig-based gate did).
338- Name : "TestGlobalElasticsearchTlsJksSecretRendersOk_ExistingSecretOnly" ,
339- Values : map [string ]string {
340- "orchestration.data.secondaryStorage.type" : "elasticsearch" ,
341- "global.elasticsearch.tls.jks.secret.existingSecret" : "my-jks-pw-secret" ,
342- },
343- Verifier : func (t * testing.T , output string , err error ) {
344- s .Require ().Nil (err )
345- },
346- },
347- {
348- Name : "TestGlobalOpensearchTlsJksSecretRendersOk_ExistingSecretOnly" ,
349- Values : map [string ]string {
350- "orchestration.data.secondaryStorage.type" : "opensearch" ,
351- "global.opensearch.tls.jks.secret.existingSecret" : "my-jks-pw-secret" ,
352- },
353- Verifier : func (t * testing.T , output string , err error ) {
354- s .Require ().Nil (err )
355- },
356- },
357- {
358- // Exercises the inlineSecret branch of the gate
359- // (or .secret.existingSecret .secret.inlineSecret).
360- // Both branches must fire the warning independently.
361- Name : "TestGlobalElasticsearchTlsJksSecretRendersOk_InlineSecret" ,
362- Values : map [string ]string {
363- "orchestration.data.secondaryStorage.type" : "elasticsearch" ,
364- "global.elasticsearch.tls.jks.secret.inlineSecret" : "changeit" ,
365- },
366- Verifier : func (t * testing.T , output string , err error ) {
367- s .Require ().Nil (err )
368- },
369- },
370- {
371- Name : "TestGlobalOpensearchTlsJksSecretRendersOk_InlineSecret" ,
372- Values : map [string ]string {
373- "orchestration.data.secondaryStorage.type" : "opensearch" ,
374- "global.opensearch.tls.jks.secret.inlineSecret" : "changeit" ,
375- },
376- Verifier : func (t * testing.T , output string , err error ) {
377- s .Require ().Nil (err )
378- },
379- },
380- {
381- Name : "TestGlobalElasticsearchTlsSecretRendersOk" ,
382- Values : map [string ]string {
383- "orchestration.data.secondaryStorage.type" : "elasticsearch" ,
384- "global.elasticsearch.tls.secret.existingSecret" : "my-legacy-jks" ,
385- },
386- Verifier : func (t * testing.T , output string , err error ) {
387- s .Require ().Nil (err )
388- },
389- },
390- {
391- Name : "TestGlobalOpensearchTlsSecretRendersOk" ,
392- Values : map [string ]string {
393- "orchestration.data.secondaryStorage.type" : "opensearch" ,
394- "global.opensearch.tls.secret.existingSecret" : "my-legacy-jks" ,
395- },
396- Verifier : func (t * testing.T , output string , err error ) {
397- s .Require ().Nil (err )
398- },
399- },
400329 {
401330 Name : "TestCaBundleAndLegacyJksCoexistRenderOk_Elasticsearch" ,
402331 Values : map [string ]string {
@@ -459,17 +388,14 @@ func (s *ConstraintTemplateTest) TestBitnamiSubchartDeprecationWarnings() {
459388 testCases := []testhelpers.TestCase {
460389 {
461390 Name : "TestBitnamiDeprecationWarningDoesNotPreventInstallWithElasticsearch" ,
462- Values : map [string ]string {
463- // elasticsearch.enabled and global.elasticsearch.enabled default to true via test helper
464- },
391+ Values : map [string ]string {},
465392 Verifier : func (t * testing.T , output string , err error ) {
466393 s .Require ().Nil (err )
467394 },
468395 },
469396 {
470397 Name : "TestRenderSucceedsWithAllBitnamiSubchartsDisabled" ,
471398 Values : map [string ]string {
472- "global.elasticsearch.enabled" : "false" ,
473399 "orchestration.data.secondaryStorage.type" : "rdbms" ,
474400 },
475401 Verifier : func (t * testing.T , output string , err error ) {
@@ -517,10 +443,6 @@ func (s *ConstraintTemplateTest) TestCamundaHubConsolidationDeprecationWarningsR
517443 testhelpers .RunTestCasesE (s .T (), s .chartPath , s .release , s .namespace , s .templates , testCases )
518444}
519445
520- // TestWebModelerExternalDatabaseUserRemovedGate verifies the
521- // webModeler.restapi.externalDatabase.user removal check (camundaPlatform.keyRemoved,
522- // which calls fail and IS surfaced by helm template) fires on both enablement
523- // paths: the legacy webModeler.enabled key and the new camundaHub.enabled key.
524446func (s * ConstraintTemplateTest ) TestWebModelerExternalDatabaseUserRemovedGate () {
525447 testCases := []testhelpers.TestCase {
526448 {
@@ -532,9 +454,8 @@ func (s *ConstraintTemplateTest) TestWebModelerExternalDatabaseUserRemovedGate()
532454 "webModeler.restapi.mail.fromAddress" : "noreply@example.com" ,
533455 "webModeler.restapi.externalDatabase.user" : "modeler-user" ,
534456 },
535- Verifier : func (t * testing.T , output string , err error ) {
536- s .Require ().ErrorContains (err , "webModeler.restapi.externalDatabase.user" )
537- s .Require ().ErrorContains (err , "has been removed" )
457+ Expected : map [string ]string {
458+ "ERROR" : `The Helm values file key "webModeler.restapi.externalDatabase.user" has been removed.` ,
538459 },
539460 },
540461 {
@@ -546,9 +467,8 @@ func (s *ConstraintTemplateTest) TestWebModelerExternalDatabaseUserRemovedGate()
546467 "webModeler.restapi.mail.fromAddress" : "noreply@example.com" ,
547468 "webModeler.restapi.externalDatabase.user" : "modeler-user" ,
548469 },
549- Verifier : func (t * testing.T , output string , err error ) {
550- s .Require ().ErrorContains (err , "webModeler.restapi.externalDatabase.user" )
551- s .Require ().ErrorContains (err , "has been removed" )
470+ Expected : map [string ]string {
471+ "ERROR" : `The Helm values file key "webModeler.restapi.externalDatabase.user" has been removed.` ,
552472 },
553473 },
554474 }
0 commit comments