Skip to content

Add tests for dotnet default instrumentation (#168) #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 33 additions & 20 deletions .github/workflows/operator-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,6 @@ jobs:
make deploy
kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch

- name: Test case for cloudwatch agent pod creation
run: |
kubectl apply -f integration-tests/manifests/cloudwatch-agent-daemonset.yaml -n amazon-cloudwatch
sleep 5
kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch

pod_name="$(kubectl get pods -n amazon-cloudwatch -l app.kubernetes.io/component=amazon-cloudwatch-agent,app.kubernetes.io/instance=amazon-cloudwatch.cloudwatch-agent -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}')"
if [ -z "$pod_name" ]; then
echo "Pod $pod_name is not created. Exiting with ERROR."
echo "Pod is not created test case: FAIL"
else
echo "Pod $pod_name is created."
echo "Pod is created test case: PASS"
fi

- name: Test for default instrumentation resources for Java
run: |
Expand All @@ -85,8 +71,7 @@ jobs:
sleep 5
kubectl wait --for=condition=Ready pod --all -n default

cd integration-tests/manifests/cmd
go run validate_instrumentation_vars.go default ns_instrumentation_env_variables.json
go run integration-tests/manifests/cmd/validate_instrumentation_vars.go default integration-tests/manifests/cmd/ns_instrumentation_env_variables.json
kubectl delete instrumentation sample-instrumentation

- name: Test for default instrumentation resources for python
Expand All @@ -109,16 +94,43 @@ jobs:
go run validate_instrumentation_vars.go default ns_instrumentation_env_variables.json
kubectl delete instrumentation sample-instrumentation

- name: Test for default instrumentation resources for python and java
- name: Test for default instrumentation resources for dotnet
run: |
cat integration-tests/dotnet/sample-deployment-dotnet.yaml
kubectl apply -f integration-tests/dotnet/sample-deployment-dotnet.yaml
sleep 5
kubectl delete pods --all -n default
kubectl wait --for=condition=Available deployment/nginx -n default
kubectl get pods -A
kubectl describe pods -n default
go run integration-tests/manifests/cmd/validate_instrumentation_vars.go default integration-tests/dotnet/default_instrumentation_dotnet_env_variables.json

- name: Test for defined instrumentation resources for dotnet
run: |
kubectl apply -f integration-tests/python-java/sample-deployment-python-java.yaml
kubectl apply -f integration-tests/manifests/sample-instrumentation.yaml
kubectl delete pods --all -n default
sleep 5
kubectl wait --for=condition=Ready pod --all -n default

go run integration-tests/manifests/cmd/validate_instrumentation_vars.go default integration-tests/python-java/default_instrumentation_python-java_env_variables.json
cd integration-tests/manifests/cmd
go run validate_instrumentation_vars.go default ns_instrumentation_env_variables.json
kubectl delete instrumentation sample-instrumentation


- name: Test for defined instrumentation resources for python and java
- name: Test for default instrumentation resources for python java dotnet
run: |
kubectl apply -f integration-tests/python-java-dotnet/sample-deployment-python-java-dotnet.yaml
sleep 5
kubectl delete pods --all -n default
kubectl wait --for=condition=Available deployment/nginx -n default
sleep 5
kubectl get pods -A
kubectl describe pods -n default
kubectl describe pods -n amazon-cloudwatch
go run integration-tests/manifests/cmd/validate_instrumentation_vars.go default integration-tests/python-java-dotnet/default_instrumentation_python-java-dotnet_env_variables.json


- name: Test for defined instrumentation resources for python java dotnet
run: |
kubectl apply -f integration-tests/manifests/sample-instrumentation.yaml
kubectl delete pods --all -n default
Expand All @@ -129,6 +141,7 @@ jobs:
go run validate_instrumentation_vars.go default ns_instrumentation_env_variables.json
kubectl delete instrumentation sample-instrumentation


DeploymentAnnotationsTest:
name: DeploymentAnnotationsTest
runs-on: ubuntu-latest
Expand Down
Loading
Loading