Skip to content

Commit a7f085a

Browse files
committed
Add a basic sanity test
1 parent c1a39bc commit a7f085a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/bats/sidekiq-orchestrator.bats

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ teardown() {
2929
cleanup_containers 1
3030
}
3131

32+
@test "sanity" {
33+
cd "$(get_project_root)"
34+
35+
run_background 'o1' bundle exec sidekiq -c 1 -r ./examples/remote_executor.rb -q dynflow_orchestrator
36+
wait_for 5 1 grep 'dynflow: Acquired orchestrator lock, entering active mode.' "$(bg_output_file o1)"
37+
38+
run_background 'w1' bundle exec sidekiq -r ./examples/remote_executor.rb -q default
39+
wait_for 5 1 grep -P 'class=Dynflow::Executors::Sidekiq::WorkerJobs::DrainMarker.*INFO: done' "$(bg_output_file w1)"
40+
41+
timeout 10 bundle exec ruby examples/remote_executor.rb client 1
42+
wait_for 1 1 grep -P 'dynflow: ExecutionPlan.*running >>.*stopped' "$(bg_output_file o1)"
43+
}
44+
3245
@test "only one orchestrator can be active at a time" {
3346
cd "$(get_project_root)"
3447

0 commit comments

Comments
 (0)