Skip to content

Commit

Permalink
Run e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino committed May 14, 2024
1 parent 05c6b3e commit 1c2459d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 45 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,20 @@ jobs:
- name: Test
run: |
curl --fail-with-body $(minikube service test-${{ env.INITCONTAINER_LANGUAGE }}-app-service --url -n test-${{ env.INITCONTAINER_LANGUAGE }})
curl --fail-with-body $(minikube service test-app-${{ env.INITCONTAINER_LANGUAGE }}-service --url -n test-${{ env.INITCONTAINER_LANGUAGE }})
# - name: Run e2e-test
# uses: newrelic/newrelic-integration-e2e-action@a97ced80a4841c8c6261d1f9dca6706b1d89acb1 # 1.11.0
# with:
# retry_seconds: 60
# retry_attempts: 5
# agent_enabled: false
# spec_path: tests/${{ env.INITCONTAINER_LANGUAGE }}/test-specs.yml
# account_id: ${{ secrets.K8S_AGENTS_E2E_ACCOUNT_ID }}
# api_key: ${{ secrets.K8S_AGENTS_E2E_API_KEY }}
# license_key: ${{ secrets.K8S_AGENTS_E2E_LICENSE_KEY }}
- name: Run e2e-test
uses: newrelic/newrelic-integration-e2e-action@a97ced80a4841c8c6261d1f9dca6706b1d89acb1 # 1.11.0
with:
# retry_seconds: 60
# retry_attempts: 5
retry_seconds: 5
retry_attempts: 1
agent_enabled: false
spec_path: tests/${{ env.INITCONTAINER_LANGUAGE }}/test-specs.yml
account_id: ${{ secrets.K8S_AGENTS_E2E_ACCOUNT_ID }}
api_key: ${{ secrets.K8S_AGENTS_E2E_API_KEY }}
license_key: ${{ secrets.NEW_RELIC_LICENSE_KEY }}

publish:
if: ${{ github.event_name == 'release' }}
Expand Down
24 changes: 0 additions & 24 deletions test.sh

This file was deleted.

12 changes: 2 additions & 10 deletions tests/python/test-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,10 @@ scenarios:
- description: |
This scenario will verify that transactions are reported by the
before:
- kubectl create namespace nr-${SCENARIO_TAG}
- kubectl apply -f ./customresource.yaml -n nr-${SCENARIO_TAG}
- kubectl apply -f ./test_app_deployment.yaml -n nr-${SCENARIO_TAG}
- sleep 10
- kubectl wait --for=condition=Ready --namespace nr-${SCENARIO_TAG} --all pods
- curl --fail-with-body $(minikube service test-app-python-service --url -n nr-${SCENARIO_TAG})
after:
- kubectl delete -f ./customresource.yaml -n nr-${SCENARIO_TAG}
- kubectl delete -f ./test_app_deployment.yaml -n nr-${SCENARIO_TAG}
- curl --fail-with-body $(minikube service test-app-python-service --url -n test-python)
tests:
nrqls:
- query: FROM Metric SELECT latest(something) AS 'start_time' WHERE metricName = 'k8s.persistentvolume.createdAt' AND appName = 'k8s-e2e-test-app-${SCENARIO_TAG:-0}'
- query: FROM Transaction SELECT latest(something) AS 'start_time' WHERE appName = 'k8s-e2e-test-app-python'
expected_results:
- key: "start_time"
lowerBoundedValue: 0.0
Expand Down

0 comments on commit 1c2459d

Please sign in to comment.