Merge pull request #1471 from adamoutler/tidy-test-scripts

Tidy test scripts
This commit is contained in:
Jokob @NetAlertX
2026-01-30 07:04:11 +11:00
committed by GitHub
4 changed files with 6 additions and 19 deletions

View File

@@ -1,13 +0,0 @@
#!/bin/sh
# shellcheck shell=sh
# Simple helper to run pytest inside the devcontainer with correct paths
set -eu
# Ensure we run from the workspace root
cd /workspaces/NetAlertX
# Make sure PYTHONPATH includes server and workspace
export PYTHONPATH="/workspaces/NetAlertX:/workspaces/NetAlertX/server:/app:/app/server:${PYTHONPATH:-}"
# Default to running the full test suite under /workspaces/NetAlertX/test
pytest -q --maxfail=1 --disable-warnings test "$@"

View File

@@ -95,5 +95,5 @@ jobs:
- name: Run Docker-based tests
run: |
echo "🐳 Running Docker-based tests..."
chmod +x ./test/docker_tests/run_docker_tests.sh
./test/docker_tests/run_docker_tests.sh
chmod +x ./scripts/run_tests_in_docker_environment.sh
./scripts/run_tests_in_docker_environment.sh

View File

@@ -61,7 +61,7 @@ jobs:
- name: Run Docker Integration Script
run: |
chmod +x ./test/docker_tests/run_docker_tests.sh
chmod +x ./scripts/run_tests_in_docker_environment.sh
# We update the pytest command to use the specific paths built above.
# Note: We still keep your 'not' filter to skip E2E tests unless you want them.
@@ -70,9 +70,9 @@ jobs:
echo "🚀 Targeted Pytest Command: $SED_COMMAND"
sed -i "s|pytest -m 'not (docker or compose or feature_complete)'|$SED_COMMAND|g" ./test/docker_tests/run_docker_tests.sh
sed -i "s|pytest -m 'not (docker or compose or feature_complete)'|$SED_COMMAND|g" ./scripts/run_tests_in_docker_environment.sh
./test/docker_tests/run_docker_tests.sh
./scripts/run_tests_in_docker_environment.sh
- name: Cleanup
if: always()

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# run_docker_tests.sh
# run_tests_in_docker_environment.sh
#
# This script automates the entire process of testing the application
# within its intended, privileged devcontainer environment. It is