+# Tests if a variable value in the ECS is equal to a target value and and optional timeout.
+# Arg: <variable-name> <target-value> - This test set pass or fail depending on if the variable is
+# equal to the target or not.
+# Arg: <variable-name> <target-value> <timeout-in-sec> - This test waits up to the timeout seconds
+# before setting pass or fail depending on if the variable value becomes equal to the target
+# value or not.
+# (Function for test scripts)
+ecs_equal() {
+ if [ $# -eq 2 ] || [ $# -eq 3 ]; then
+ __var_test ECS "$LOCALHOST$ECS_EXTERNAL_PORT/" $1 "=" $2 $3
+ else
+ __print_err "Wrong args to ecs_equal, needs two or three args: <sim-param> <target-value> [ timeout ]" $@
+ fi
+}