mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
* feat: added worker for executing and scheduling parallel tasks * feat: implemented worker based execution over cron handlers * feat: added router to package to run go fiber for dns validation * chore: added router package to go workspace * feat: added dns route controller * feat: added dns validation handler for route * feat: added healthcheck as a core function * feat: implemented worker for scheduling and running multiple tasks over goroutines * feat: added cron and http start handlers * feat: added prime scheduler handler to comply with prime scheduler * feat: implemented worker in cli start command * feat: added tests for dns validation handler * feat: added run test script to run test inside monitor * feat: added test for background worker * feat: implemented graceful shutdown for cancellation of jobs * feat: added readme for core package * fix: worker cancellation of tasks with ctx * fix: added closing channels in worker * fix: handled case for repeated keys in dns validation endpoint
27 lines
569 B
Bash
Executable File
27 lines
569 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Function to check for test files and run tests if they exist
|
|
run_tests_if_exist() {
|
|
local dir=$1
|
|
if ls "$dir"/*_test.go 1> /dev/null 2>&1; then
|
|
cd "$dir"
|
|
go test ./... -v -cover
|
|
cd - > /dev/null
|
|
fi
|
|
}
|
|
|
|
# Function to recursively find and run tests in all directories
|
|
find_and_run_tests() {
|
|
local base_dir=$1
|
|
for dir in $(find "$base_dir" -type d); do
|
|
run_tests_if_exist "$dir"
|
|
done
|
|
}
|
|
|
|
# Run tests in the cli module
|
|
find_and_run_tests "cli"
|
|
|
|
# Run tests in the lib directory
|
|
find_and_run_tests "lib"
|
|
|