Skip to content

Commit

Permalink
Moving e2e test key
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino committed May 16, 2024
1 parent 4cfdf9b commit 9720df1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/python/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ spec:
env:
- name: NEW_RELIC_APP_NAME
value: k8s-e2e-test-app-python
- name: SCENARIO_TAG
value: {{ quote .Values.scenarioTag }}
- name: NEW_RELIC_LABELS
value: "testKey:{{ .Values.scenarioTag | default "NOTSET" }}"
---
apiVersion: v1
kind: Service
Expand Down
5 changes: 1 addition & 4 deletions tests/python/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import sys
import traceback

Expand All @@ -10,10 +9,8 @@
@app.route("/")
def hello_world():
try:
from newrelic.agent import current_transaction, add_custom_attribute

from newrelic.agent import current_transaction
assert current_transaction(), "No active transaction."
add_custom_attribute("testKey", os.getenv("SCENARIO_TAG", "NOTSET"))
except Exception:
return "".join(traceback.format_exception(*sys.exc_info())), 417

Expand Down
5 changes: 2 additions & 3 deletions tests/python/test-specs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
description: |
End-to-end tests for python initcontainer
description: End-to-end tests for python initcontainer
custom_test_key: tags.testKey
scenarios:
- description: This scenario will verify that a transaction is reported by the test app after a curl request
before:
Expand Down

0 comments on commit 9720df1

Please sign in to comment.