Skip to content

Commit

Permalink
refactor: reorganize test roundtrip scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
basti1302 committed May 21, 2024
1 parent b2a2753 commit ac05424
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 17 deletions.
16 changes: 0 additions & 16 deletions scripts/test-roundtrip.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname ${BASH_SOURCE})"/..
cd "$(dirname ${BASH_SOURCE})"/../..

kubectl delete -k config/samples || true
make uninstall || true
make undeploy || true
test-resources/node.js/express/undeploy.sh
test-resources/collector/undeploy.sh
44 changes: 44 additions & 0 deletions test-resources/bin/test-roundtrip-01-aum-cr-operator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname ${BASH_SOURCE})"/../..

echo Make sure cert-manager is deployed as well:
echo test-resources/cert-manager/deploy.sh

echo STEP 1: remove old test resources
test-resources/bin/test-cleanup.sh
echo
echo

echo STEP 2: deploy the collector
test-resources/collector/deploy.sh
echo
echo

echo STEP 3: rebuild the operator image
make docker-build
echo
echo

echo STEP 4: deploy application under monitoring
test-resources/node.js/express/build-and-deploy.sh
echo
echo

echo STEP 5: install the custom resource definition
make install
echo
echo

sleep 5

echo STEP 6: deploy the Dash0 custom resource to the target namespace
kubectl apply -k config/samples
echo
echo

sleep 5

echo STEP 7: deploy the Dash0 operator
make deploy
44 changes: 44 additions & 0 deletions test-resources/bin/test-roundtrip-02-aum-operator-cr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname ${BASH_SOURCE})"/../..

echo Make sure cert-manager is deployed as well:
echo test-resources/cert-manager/deploy.sh

echo STEP 1: remove old test resources
test-resources/bin/test-cleanup.sh
echo
echo

echo STEP 2: deploy the collector
test-resources/collector/deploy.sh
echo
echo

echo STEP 3: rebuild the operator image
make docker-build
echo
echo

echo STEP 4: deploy application under monitoring
test-resources/node.js/express/build-and-deploy.sh
echo
echo

echo STEP 5: install the custom resource definition
make install
echo
echo

sleep 5

echo STEP 6: deploy the Dash0 operator
make deploy
echo
echo

sleep 5

echo STEP 7: deploy the Dash0 custom resource to the target namespace
kubectl apply -k config/samples
46 changes: 46 additions & 0 deletions test-resources/bin/test-roundtrip-03-operator-cr-aum.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname ${BASH_SOURCE})"/../..

echo Make sure cert-manager is deployed as well:
echo test-resources/cert-manager/deploy.sh

echo STEP 1: remove old test resources
test-resources/bin/test-cleanup.sh
echo
echo

echo STEP 2: deploy the collector
test-resources/collector/deploy.sh
echo
echo

echo STEP 3: rebuild the operator image
make docker-build
echo
echo

echo STEP 4: install the custom resource definition
make install
echo
echo

sleep 5

echo STEP 5: deploy the Dash0 operator
make deploy
echo
echo

sleep 5

echo STEP 6: deploy the Dash0 custom resource to the target namespace
kubectl apply -k config/samples
echo
echo

sleep 5

echo STEP 7: deploy application under monitoring
test-resources/node.js/express/build-and-deploy.sh

0 comments on commit ac05424

Please sign in to comment.