Skip to content

Commit 7422497

Browse files
committed
Update test app deployments for all agents
1 parent 5409c89 commit 7422497

File tree

6 files changed

+53
-17
lines changed

6 files changed

+53
-17
lines changed

tests/dotnet/test-specs.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
description: End-to-end tests for dotnet initcontainer
1+
description: End-to-end tests for .NET initcontainer
22
custom_test_key: tags.testKey
33
scenarios:
44
- description: This scenario will verify that a transaction is reported by the test app after a curl request
55
before:
6+
# Deploy test app chart
67
- helm install test-dotnet ./chart/ --set=scenarioTag="${SCENARIO_TAG}" -n default
78
- sleep 5
8-
- kubectl wait --for=condition=Ready -n default --all pods
9-
# - kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || $(echo "Operator failed to attach initcontainer." >&2; exit 1)
10-
- sleep 15 # give the agent time to connect
9+
# Recreate test app pod to ensure instrumentation resource is used
10+
- kubectl delete pods -l "app=test-app-dotnet"
11+
# Wait for pods to pass healthchecks
12+
- sleep 5
13+
- kubectl wait --for=condition=Ready -n default --all pods --timeout=2m
14+
# Ensure initcontainer was attached by operator
15+
- kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || { echo -e "===== Operator failed to attach initcontainer. =====" >&2; exit 1; }
16+
# Give the agent time to connect
17+
- sleep 15
18+
# Send traffic to test app to generate transactions
1119
- curl --fail-with-body $(minikube service test-app-dotnet-service --url -n default)/WeatherForecast
1220
tests:
1321
nrqls:

tests/java/test-specs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
description: End-to-end tests for java initcontainer
1+
description: End-to-end tests for Java initcontainer
22
custom_test_key: tags.testKey
33
scenarios:
44
- description: This scenario will verify that a transaction is reported by the test app after a curl request
55
before:
6+
# Deploy test app chart
67
- helm install test-java ./chart/ --set=scenarioTag="${SCENARIO_TAG}" -n default
8+
- sleep 5
9+
# Recreate test app pod to ensure instrumentation resource is used
10+
- kubectl delete pods -l "app=test-app-java"
11+
# Wait for pods to pass healthchecks
712
- sleep 120
8-
- kubectl wait --for=condition=Ready -n default --all pods
9-
# - kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || $(echo "Operator failed to attach initcontainer." >&2; exit 1)
13+
- kubectl wait --for=condition=Ready -n default --all pods --timeout=2m
14+
# Ensure initcontainer was attached by operator
15+
- kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || { echo -e "===== Operator failed to attach initcontainer. =====" >&2; exit 1; }
16+
# Send traffic to test app to generate transactions
1017
- curl --fail-with-body $(minikube service test-app-java-service --url -n default)
1118
tests:
1219
nrqls:

tests/nodejs/test-specs.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@ custom_test_key: tags.testKey
33
scenarios:
44
- description: This scenario will verify that a transaction is reported by the test app after a curl request
55
before:
6+
# Deploy test app chart
67
- helm install test-nodejs ./chart/ --set=scenarioTag="${SCENARIO_TAG}" -n default
78
- sleep 5
8-
- kubectl wait --for=condition=Ready -n default --all pods
9-
# - kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || $(echo "Operator failed to attach initcontainer." >&2; exit 1)
9+
# Recreate test app pod to ensure instrumentation resource is used
10+
- kubectl delete pods -l "app=test-app-nodejs"
11+
# Wait for pods to pass healthchecks
12+
- sleep 5
13+
- kubectl wait --for=condition=Ready -n default --all pods --timeout=2m
14+
# Ensure initcontainer was attached by operator
15+
- kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || { echo -e "===== Operator failed to attach initcontainer. =====" >&2; exit 1; }
16+
# Send traffic to test app to generate transactions
1017
- curl --fail-with-body $(minikube service test-app-nodejs-service --url -n default)
1118
tests:
1219
nrqls:

tests/php/test-specs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
description: End-to-end tests for php initcontainer
1+
description: End-to-end tests for PHP initcontainer
22
custom_test_key: tags.testKey
33
scenarios:
44
- description: This scenario will verify that a transaction is reported by the test app after a curl request
55
before:
6-
- helm install test-php ./chart/ --set=scenarioTag="${SCENARIO_TAG}" ${TEST_APP_HELM_CHART_ARGS} -n default
6+
# Deploy test app chart
7+
- helm install test-php ./chart/ --set=scenarioTag="${SCENARIO_TAG}" -n default
8+
- sleep 5
9+
# Recreate test app pod to ensure instrumentation resource is used
10+
- kubectl delete pods -l "app=test-app-php"
11+
# Wait for pods to pass healthchecks
712
- sleep 5
813
- kubectl wait --for=condition=Ready -n default --all pods --timeout=2m
9-
# - kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || $(echo "Operator failed to attach initcontainer." >&2; exit 1)
14+
# Ensure initcontainer was attached by operator
15+
- kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || { echo -e "===== Operator failed to attach initcontainer. =====" >&2; exit 1; }
16+
# Send traffic to test app to generate transactions
1017
- curl --fail-with-body $(minikube service test-app-php-service --url -n default)
1118
- sleep 5
1219
- curl --fail-with-body $(minikube service test-app-php-service --url -n default)

tests/python/test-specs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
description: End-to-end tests for python initcontainer
1+
description: End-to-end tests for Python initcontainer
22
custom_test_key: tags.testKey
33
scenarios:
44
- description: This scenario will verify that a transaction is reported by the test app after a curl request
@@ -8,8 +8,8 @@ scenarios:
88
- sleep 5
99
# Recreate test app pod to ensure instrumentation resource is used
1010
- kubectl delete pods -l "app=test-app-python"
11-
- sleep 5
1211
# Wait for pods to pass healthchecks
12+
- sleep 5
1313
- kubectl wait --for=condition=Ready -n default --all pods --timeout=2m
1414
# Ensure initcontainer was attached by operator
1515
- kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || { echo -e "===== Operator failed to attach initcontainer. =====" >&2; exit 1; }

tests/ruby/test-specs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
description: End-to-end tests for ruby initcontainer
1+
description: End-to-end tests for Ruby initcontainer
22
custom_test_key: tags.testKey
33
scenarios:
44
- description: This scenario will verify that a transaction is reported by the test app after a curl request
55
before:
6+
# Deploy test app chart
67
- helm install test-ruby ./chart/ --set=scenarioTag="${SCENARIO_TAG}" -n default
78
- sleep 5
8-
- kubectl wait --for=condition=Ready -n default --all pods
9-
# - kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || $(echo "Operator failed to attach initcontainer." >&2; exit 1)
9+
# Recreate test app pod to ensure instrumentation resource is used
10+
- kubectl delete pods -l "app=test-app-ruby"
11+
# Wait for pods to pass healthchecks
12+
- sleep 5
13+
- kubectl wait --for=condition=Ready -n default --all pods --timeout=2m
14+
# Ensure initcontainer was attached by operator
15+
- kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" || { echo -e "===== Operator failed to attach initcontainer. =====" >&2; exit 1; }
16+
# Send traffic to test app to generate transactions
1017
- curl --fail-with-body $(minikube service test-app-ruby-service --url -n default)/
1118
tests:
1219
nrqls:

0 commit comments

Comments
 (0)