Skip to content

Commit

Permalink
chart(fix): [regression] Able to disable tracing via config key traci…
Browse files Browse the repository at this point in the history
…ng.enabled

Fixes: #2355

Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Aug 15, 2024
1 parent 3589a0c commit 3bdcb0d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/logging-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
10 changes: 10 additions & 0 deletions tests/charts/templates/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3bdcb0d

Please sign in to comment.