Skip to content

Commit

Permalink
add the smoke test for scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeetSaroha committed Jan 21, 2025
1 parent 1c98dd7 commit a767fa5
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .makim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ groups:
- task: smoke-tests.matrix
- task: smoke-tests.shell-app
- task: smoke-tests.ssh-remote-execution
- task: smoke-tests.scheduler

ci:
help: Run all tasks used on CI
Expand Down Expand Up @@ -430,6 +431,30 @@ groups:
makim $VERBOSE_FLAG --file $MAKIM_FILE --version
makim $VERBOSE_FLAG --file $MAKIM_FILE remote_test.echo_test
scheduler:
help: Test makim with scheduler
args:
verbose-mode:
help: Run the all the tests in verbose mode
type: bool
action: store_true
env:
MAKIM_FILE: tests/smoke/.scheduler.yaml
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
makim $VERBOSE_FLAG --file $MAKIM_FILE --version
makim $VERBOSE_FLAG --file $MAKIM_FILE cron list
makim $VERBOSE_FLAG --file $MAKIM_FILE cron start test_basic_echo
makim $VERBOSE_FLAG --file $MAKIM_FILE cron list
makim $VERBOSE_FLAG --file $MAKIM_FILE cron start --all
makim $VERBOSE_FLAG --file $MAKIM_FILE cron list
makim $VERBOSE_FLAG --file $MAKIM_FILE cron stop test_basic_echo
makim $VERBOSE_FLAG --file $MAKIM_FILE cron list
makim $VERBOSE_FLAG --file $MAKIM_FILE cron stop --all
makim $VERBOSE_FLAG --file $MAKIM_FILE cron list
error:
help: This group helps tests failure tasks
tasks:
Expand Down
29 changes: 29 additions & 0 deletions tests/smoke/.scheduler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
groups:
test:
tasks:
test-echo:
run: echo "Basic echo test successful"

test-date:
run: |
echo "Testing date command..."
date
test-sleep:
run: |
echo "Starting sleep test..."
sleep 2
echo "Sleep test complete"
scheduler:
test_basic_echo:
schedule: "*/5 * * * *"
task: test.test-echo

test_date_command:
schedule: "*/10 * * * *"
task: test.test-date

test_sleep_function:
schedule: "*/15 * * * *"
task: test.test-sleep

0 comments on commit a767fa5

Please sign in to comment.