Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino committed May 14, 2024
1 parent 116d21a commit a1254d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,18 @@ jobs:

- name: Deploy cert-manager to minikube
run: |
kubectl create namespace cert-manager
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml
helm repo add jetstack https://charts.jetstack.io --force-update
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.14.5 --set installCRDs=true
sleep 5
kubectl wait --for=condition=Ready --namespace cert-manager --all pods
kubectl wait --for=condition=Ready -n cert-manager --all pods
- name: Deploy New Relic k8s-agents-operator to minikube
run: |
kubectl create secret generic newrelic-key-secret -n default --from-literal=new_relic_license_key=$NEW_RELIC_LICENSE_KEY
helm repo add k8s-agents-operator https://newrelic.github.io/k8s-agents-operator
helm upgrade --install k8s-agents-operator k8s-agents-operator/k8s-agents-operator --namespace k8s-agents-operator --create-namespace
helm upgrade --install k8s-agents-operator k8s-agents-operator/k8s-agents-operator -n default
sleep 5
kubectl wait --for=condition=Ready --namespace k8s-agents-operator --all pods
kubectl wait --for=condition=Ready -n default --all pods
- name: Build init container
run: |
Expand All @@ -76,16 +77,14 @@ jobs:
- name: Deploy test app to minikube
run: |
kubectl create namespace test-${{ env.INITCONTAINER_LANGUAGE }}
kubectl create secret generic newrelic-key-secret -n test-python --from-literal=new_relic_license_key=$NEW_RELIC_LICENSE_KEY
kubectl apply -f tests/${{ env.INITCONTAINER_LANGUAGE }}/customresource.yaml -n test-${{ env.INITCONTAINER_LANGUAGE }}
kubectl apply -f tests/${{ env.INITCONTAINER_LANGUAGE }}/test_app_deployment.yaml -n test-${{ env.INITCONTAINER_LANGUAGE }}
kubectl apply -f tests/${{ env.INITCONTAINER_LANGUAGE }}/customresource.yaml -n default
kubectl apply -f tests/${{ env.INITCONTAINER_LANGUAGE }}/test_app_deployment.yaml -n default
sleep 5
kubectl wait --for=condition=Ready --namespace test-${{ env.INITCONTAINER_LANGUAGE }} --all pods
- name: Test
run: |
curl --fail-with-body $(minikube service test-app-${{ env.INITCONTAINER_LANGUAGE }}-service --url -n test-${{ env.INITCONTAINER_LANGUAGE }})
curl --fail-with-body $(minikube service test-app-${{ env.INITCONTAINER_LANGUAGE }}-service --url -n default)
- name: Run e2e-test
uses: newrelic/newrelic-integration-e2e-action@a97ced80a4841c8c6261d1f9dca6706b1d89acb1 # 1.11.0
Expand Down
2 changes: 1 addition & 1 deletion tests/python/test-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: |
scenarios:
- description: This scenario will verify that a transaction is reported by the test app after a curl request
before:
- curl --fail-with-body $(minikube service test-app-python-service --url -n test-python)
- curl --fail-with-body $(minikube service test-app-python-service --url -n default)
tests:
nrqls:
- query: FROM Transaction SELECT latest(something) AS 'start_time' WHERE appName = 'k8s-e2e-test-app-python'
Expand Down

0 comments on commit a1254d0

Please sign in to comment.