mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
Adjust healthchecks and fix docker test scripts
This commit is contained in:
6
.github/copilot-instructions.md
vendored
6
.github/copilot-instructions.md
vendored
@@ -83,3 +83,9 @@ Backend loop phases (see `server/__main__.py` and `server/plugin.py`): `once`, `
|
|||||||
- Be sure to offer choices when appropriate.
|
- Be sure to offer choices when appropriate.
|
||||||
- Always understand the intent of the user's request and undo/redo as needed.
|
- Always understand the intent of the user's request and undo/redo as needed.
|
||||||
- Above all, use the simplest possible code that meets the need so it can be easily audited and maintained.
|
- Above all, use the simplest possible code that meets the need so it can be easily audited and maintained.
|
||||||
|
- Always leave logging enabled. If there is a possiblity it will be difficult to debug with current logging, add more logging.
|
||||||
|
- Always run the testFailure tool before executing any tests to gather current failure information and avoid redundant runs.
|
||||||
|
- Always prioritize using the appropriate tools in the environment first. As an example if a test is failing use `testFailure` then `runTests`. Never `runTests` first.
|
||||||
|
- Docker tests take an extremely long time to run. Avoid changes to docker or tests tests until you've examined the exisiting testFailures and runTests results.
|
||||||
|
- Environment tools are designed specifically for your use in this project and running them in this order will give you the best results.
|
||||||
|
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ log_success() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# 1. Check if crond is running
|
# 1. Check if crond is running
|
||||||
if pgrep -f "crond" > /dev/null; then
|
if pgrep -f "supercronic" > /dev/null; then
|
||||||
log_success "crond is running"
|
log_success "supercronic is running"
|
||||||
else
|
else
|
||||||
log_error "crond is not running"
|
log_error "supercronic is not running"
|
||||||
fi
|
fi
|
||||||
|
docker inspect --format='{{json .State.Health}}'
|
||||||
# 2. Check if php-fpm is running
|
# 2. Check if php-fpm is running
|
||||||
if pgrep -f "php-fpm" > /dev/null; then
|
if pgrep -f "php-fpm" > /dev/null; then
|
||||||
log_success "php-fpm is running"
|
log_success "php-fpm is running"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -271,7 +271,7 @@ def create_test_scenarios() -> List[TestScenario]:
|
|||||||
compose_file = f"docker-compose.mount-test.{path_name}_{scenario_name}.yml"
|
compose_file = f"docker-compose.mount-test.{path_name}_{scenario_name}.yml"
|
||||||
|
|
||||||
# Determine expected exit code
|
# Determine expected exit code
|
||||||
expected_exit_code = 1 if scenario_name == "unwritable" else 0
|
expected_exit_code = 1 if expected_issues and not (path_name == "active_config" and scenario_name == "unwritable") else 0
|
||||||
|
|
||||||
scenarios.append(
|
scenarios.append(
|
||||||
TestScenario(
|
TestScenario(
|
||||||
|
|||||||
Reference in New Issue
Block a user