@@ -513,6 +513,110 @@ func (s *ConfigmapTemplateTest) TestDifferentValuesInputsUnifiedRDBMS() {
513513 testhelpers .RunTestCases (s .T (), s .chartPath , s .release , s .namespace , s .templates , testCases )
514514}
515515
516+ func (s * ConfigmapTemplateTest ) TestHasLegacyElasticsearchExporter () {
517+ testCases := []testhelpers.TestCase {
518+ {
519+ Name : "TestLegacyESExporterAbsentWhenRdbmsAndOptimizeButNoElasticsearch" ,
520+ Values : map [string ]string {
521+ "global.elasticsearch.enabled" : "false" ,
522+ "elasticsearch.enabled" : "false" ,
523+ "global.opensearch.enabled" : "true" ,
524+ "global.opensearch.url.host" : "opensearch.example.com" ,
525+ "orchestration.exporters.rdbms.enabled" : "true" ,
526+ "orchestration.data.secondaryStorage.rdbms.url" : "jdbc:postgresql://localhost:5432/camunda" ,
527+ "orchestration.data.secondaryStorage.rdbms.username" : "camunda" ,
528+ "orchestration.data.secondaryStorage.rdbms.secret.inlineSecret" : "my-password" ,
529+ "optimize.enabled" : "true" ,
530+ "optimize.database.opensearch.enabled" : "true" ,
531+ },
532+ Verifier : func (t * testing.T , output string , err error ) {
533+ require .NoError (t , err )
534+ require .NotContains (t , output , "io.camunda.zeebe.exporter.ElasticsearchExporter" ,
535+ "rdbms+optimize without elasticsearch must not render legacy ES exporter" )
536+ },
537+ },
538+ {
539+ Name : "TestLegacyESExporterPresentWhenRdbmsAndOptimizeAndGlobalElasticsearch" ,
540+ Values : map [string ]string {
541+ "orchestration.exporters.rdbms.enabled" : "true" ,
542+ "orchestration.data.secondaryStorage.rdbms.url" : "jdbc:postgresql://localhost:5432/camunda" ,
543+ "orchestration.data.secondaryStorage.rdbms.username" : "camunda" ,
544+ "orchestration.data.secondaryStorage.rdbms.secret.inlineSecret" : "my-password" ,
545+ "optimize.enabled" : "true" ,
546+ },
547+ Verifier : func (t * testing.T , output string , err error ) {
548+ require .NoError (t , err )
549+ require .Contains (t , output , "io.camunda.zeebe.exporter.ElasticsearchExporter" ,
550+ "rdbms+optimize with global.elasticsearch.enabled must render legacy ES exporter" )
551+ },
552+ },
553+ {
554+ Name : "TestLegacyESExporterPresentWhenRdbmsAndOptimizeDatabaseElasticsearchOnly" ,
555+ Values : map [string ]string {
556+ "global.elasticsearch.enabled" : "false" ,
557+ "elasticsearch.enabled" : "false" ,
558+ "global.opensearch.enabled" : "true" ,
559+ "global.opensearch.url.host" : "opensearch.example.com" ,
560+ "orchestration.exporters.rdbms.enabled" : "true" ,
561+ "orchestration.data.secondaryStorage.rdbms.url" : "jdbc:postgresql://localhost:5432/camunda" ,
562+ "orchestration.data.secondaryStorage.rdbms.username" : "camunda" ,
563+ "orchestration.data.secondaryStorage.rdbms.secret.inlineSecret" : "my-password" ,
564+ "optimize.enabled" : "true" ,
565+ "optimize.database.elasticsearch.enabled" : "true" ,
566+ "optimize.database.elasticsearch.external" : "true" ,
567+ },
568+ Verifier : func (t * testing.T , output string , err error ) {
569+ require .NoError (t , err )
570+ require .Contains (t , output , "io.camunda.zeebe.exporter.ElasticsearchExporter" ,
571+ "rdbms+optimize with optimize.database.elasticsearch.enabled must render legacy ES exporter" )
572+ },
573+ },
574+ {
575+ Name : "TestLegacyESExporterAbsentForSupport32901CustomerConfig" ,
576+ Values : map [string ]string {
577+ "global.elasticsearch.enabled" : "false" ,
578+ "elasticsearch.enabled" : "false" ,
579+ "global.opensearch.enabled" : "true" ,
580+ "global.opensearch.url.host" : "opensearch.example.com" ,
581+ "orchestration.exporters.rdbms.enabled" : "true" ,
582+ "orchestration.exporters.zeebe.enabled" : "true" ,
583+ "orchestration.data.secondaryStorage.rdbms.url" : "jdbc:postgresql://localhost:5432/camunda" ,
584+ "orchestration.data.secondaryStorage.rdbms.username" : "camunda" ,
585+ "orchestration.data.secondaryStorage.rdbms.secret.inlineSecret" : "my-password" ,
586+ "optimize.enabled" : "true" ,
587+ "optimize.database.opensearch.enabled" : "true" ,
588+ },
589+ Verifier : func (t * testing.T , output string , err error ) {
590+ require .NoError (t , err )
591+ require .NotContains (t , output , "io.camunda.zeebe.exporter.ElasticsearchExporter" ,
592+ "SUPPORT-32901: rdbms+optimize+zeebe with OpenSearch must not render legacy ES exporter" )
593+ require .Contains (t , output , "io.camunda.zeebe.exporter.opensearch.OpensearchExporter" ,
594+ "SUPPORT-32901: OS exporter must still render to feed Optimize" )
595+ },
596+ },
597+ {
598+ Name : "TestLegacyESExporterAbsentWhenOnlyRdbmsNoOptimize" ,
599+ Values : map [string ]string {
600+ "global.elasticsearch.enabled" : "false" ,
601+ "elasticsearch.enabled" : "false" ,
602+ "global.opensearch.enabled" : "true" ,
603+ "global.opensearch.url.host" : "opensearch.example.com" ,
604+ "orchestration.exporters.rdbms.enabled" : "true" ,
605+ "orchestration.data.secondaryStorage.rdbms.url" : "jdbc:postgresql://localhost:5432/camunda" ,
606+ "orchestration.data.secondaryStorage.rdbms.username" : "camunda" ,
607+ "orchestration.data.secondaryStorage.rdbms.secret.inlineSecret" : "my-password" ,
608+ },
609+ Verifier : func (t * testing.T , output string , err error ) {
610+ require .NoError (t , err )
611+ require .NotContains (t , output , "io.camunda.zeebe.exporter.ElasticsearchExporter" ,
612+ "rdbms without optimize must not render legacy ES exporter" )
613+ },
614+ },
615+ }
616+
617+ testhelpers .RunTestCasesE (s .T (), s .chartPath , s .release , s .namespace , s .templates , testCases )
618+ }
619+
516620func (s * ConfigmapTemplateTest ) TestMultiRegionInitialContactPoints () {
517621 testCases := []testhelpers.TestCase {
518622 {
0 commit comments