diff --git a/charts/selenium-grid/templates/logging-configmap.yaml b/charts/selenium-grid/templates/logging-configmap.yaml index 72afb6e8c..d1c090696 100644 --- a/charts/selenium-grid/templates/logging-configmap.yaml +++ b/charts/selenium-grid/templates/logging-configmap.yaml @@ -15,8 +15,8 @@ data: SE_LOG_LEVEL: {{ default "INFO" .Values.global.seleniumGrid.logLevel | quote }} SE_STRUCTURED_LOGS: {{ default false .Values.global.seleniumGrid.structuredLogs | quote }} SE_HTTP_LOGS: {{ default false .Values.global.seleniumGrid.httpLogs | quote }} + SE_ENABLE_TRACING: {{ eq (include "seleniumGrid.enableTracing" $) "true" | ternary "true" "false" | quote }} {{- if (eq (include "seleniumGrid.enableTracing" .) "true") }} - SE_ENABLE_TRACING: "true" SE_OTEL_TRACES_EXPORTER: {{ .Values.tracing.exporter | quote }} SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: {{ .Values.tracing.globalAutoConfigure | quote }} SE_OTEL_EXPORTER_ENDPOINT: {{ tpl .Values.tracing.exporterEndpoint $ | quote }} diff --git a/tests/charts/templates/test.py b/tests/charts/templates/test.py index c729bbb38..26344561c 100644 --- a/tests/charts/templates/test.py +++ b/tests/charts/templates/test.py @@ -241,6 +241,16 @@ def test_enable_leftovers_cleanup(self): count += 1 self.assertEqual(count, len(resources_name), "No node config resources found") + def test_enable_tracing(self): + resources_name = ['{0}selenium-logging-config'.format(RELEASE_NAME)] + count = 0 + for doc in LIST_OF_DOCUMENTS: + if doc['metadata']['name'] in resources_name and doc['kind'] == 'ConfigMap': + logger.info(f"Assert ENV vars for Tracing disabled is set to Node ConfigMap") + self.assertEqual(doc['data']['SE_ENABLE_TRACING'], 'false') + count += 1 + self.assertEqual(count, len(resources_name), "No node config resources found") + if __name__ == '__main__': failed = False try: