Skip to content

Commit

Permalink
Simplify the daemonset tests
Browse files Browse the repository at this point in the history
Signed-off-by: Israel Blancas <[email protected]>
  • Loading branch information
iblancasa committed Dec 11, 2023
1 parent dbb1bc5 commit 4327218
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
metadata:
name: agent-as-daemonset-agent-daemonset
status:
numberReady: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Add service account to user
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: "oc adm policy --namespace $NAMESPACE add-scc-to-user daemonset-with-hostport -z jaeger-agent-daemonset"
# Sometimes, the previous command needs some time to take effect. If we create
# the Jaeger deployment before the command takes effect, the Jaeger instance
# is not deployed. There is not a way to verify it is there except wait some
# seconds
- script: "sleep 5"

This file was deleted.

31 changes: 11 additions & 20 deletions tests/e2e/examples/render.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,16 @@

source $(dirname "$0")/../render-utils.sh

###############################################################################
# TEST NAME: examples-agent-as-daemonset
###############################################################################
start_test "examples-agent-as-daemonset"
example_name="agent-as-daemonset"

prepare_daemonset "00"
render_install_example "$example_name" "01"
render_smoke_test_example "$example_name" "02"


###############################################################################
# TEST NAME: examples-agent-with-priority-class
###############################################################################
start_test "examples-agent-with-priority-class"
example_name="agent-with-priority-class"
prepare_daemonset "00"
render_install_example "$example_name" "01"
if [ $IS_OPENSHIFT != true ]; then
rm ./01-add-policy.yaml # This is just for OpenShift
fi
render_install_example "$example_name" "02"
render_smoke_test_example "$example_name" "02"


Expand Down Expand Up @@ -152,23 +144,22 @@ render_install_cassandra "00"
render_install_example "$example_name" "01"
render_smoke_test_example "$example_name" "02"


###############################################################################
# OpenShift examples ##########################################################
# TEST NAME: examples-agent-as-daemonset
###############################################################################
start_test "examples-agent-as-daemonset"
if [ $IS_OPENSHIFT = true ]; then
start_test "examples-openshift-agent-as-daemonset"
prepare_daemonset "00"
$GOMPLATE -f $EXAMPLES_DIR/openshift/agent-as-daemonset.yaml -o 02-install.yaml
JAEGER_NAME="agent-as-daemonset" $GOMPLATE -f $TEMPLATES_DIR/allinone-jaeger-assert.yaml.template -o ./02-assert.yaml
render_install_vertx "03"
$YQ e -i '.spec.template.spec.containers[0].env=[{"name": "JAEGER_AGENT_HOST", "valueFrom": {"fieldRef": {"apiVersion": "v1", "fieldPath": "status.hostIP"}}}]' ./03-install.yaml
render_find_service "agent-as-daemonset" "production" "order" "00" "04"
else
skip_test "examples-openshift-agent-as-daemonset" "This test is only supported in OpenShift"
rm ./01-add-policy.yaml # This is just for OpenShift
render_install_example "agent-as-daemonset" "02"
fi


###############################################################################
# OpenShift examples ##########################################################
###############################################################################
if [ $IS_OPENSHIFT = true ]; then
start_test "examples-openshift-with-htpasswd"
export JAEGER_NAME="with-htpasswd"
Expand Down

0 comments on commit 4327218

Please sign in to comment.