Skip to content

Commit

Permalink
Merge pull request #8 from SUSE/poc_phase01
Browse files Browse the repository at this point in the history
Poc phase01
  • Loading branch information
fmherschel authored Apr 11, 2024
2 parents 802e981 + 838adb2 commit c7477f7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/bin/mzsh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ fi

case "$action" in
status )
# TODO: also simulate anwer like '<component> is running without'
# TODO: rc-handling (still to be confirmed)
# TODO: also take component as optional parameter (still to be confirmed)
# TODO: simuate already running: '<component> already running' (format still to be confirmed)
logger --id -t "mzsh" "mzsh process action=$action"
if [[ "$is_fail" == "yes" ]]; then
echo "blala is not running"
Expand All @@ -38,6 +42,9 @@ case "$action" in
fi
;;
startup )
# TODO: number of dots in 'starting %s...' can vary
# TODO: simulate FAILURES (format of different output strings still to be confirmed)
# TODO: rc-handling (still to be confirmed)
logger --id -t "mzsh" "mzsh process action=$action component=$comp"
if [[ "$is_fail" == "no" ]]; then
printf "starting %s..." "$comp"
Expand All @@ -50,6 +57,13 @@ case "$action" in
fi
;;
shutdown )
# TODO: siluate differnt output if compunent is already down: '<component> is not running' (format still to be confirmed)
# TODO: simulate stop with escalation to kill (was a multi line output seen on our test cluster; format still to be confirmed)
# something like:
# Shutting down %s...
# Escalated to call kill
# done.
# TODO: rc-handling (still to be confirmed)
logger --id -t "mzsh" "mzsh process action=$action component=$comp"
if [[ "$is_fail" == "no" ]]; then
printf "Shutting down %s..." "$comp"
Expand All @@ -62,5 +76,9 @@ case "$action" in
fi
;;
esac
# TODO: simulation of restart
# TODO: simulation of 'kill'


# meaningless rc
exit 99
Empty file removed test/test.placeholder
Empty file.

0 comments on commit c7477f7

Please sign in to comment.