mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-03-30 23:03:03 -07:00
Merge pull request #1471 from adamoutler/tidy-test-scripts
Tidy test scripts
This commit is contained in:
@@ -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 "$@"
|
|
||||||
4
.github/workflows/code-checks.yml
vendored
4
.github/workflows/code-checks.yml
vendored
@@ -95,5 +95,5 @@ jobs:
|
|||||||
- name: Run Docker-based tests
|
- name: Run Docker-based tests
|
||||||
run: |
|
run: |
|
||||||
echo "🐳 Running Docker-based tests..."
|
echo "🐳 Running Docker-based tests..."
|
||||||
chmod +x ./test/docker_tests/run_docker_tests.sh
|
chmod +x ./scripts/run_tests_in_docker_environment.sh
|
||||||
./test/docker_tests/run_docker_tests.sh
|
./scripts/run_tests_in_docker_environment.sh
|
||||||
|
|||||||
6
.github/workflows/run-all-tests.yml
vendored
6
.github/workflows/run-all-tests.yml
vendored
@@ -61,7 +61,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run Docker Integration Script
|
- name: Run Docker Integration Script
|
||||||
run: |
|
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.
|
# 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.
|
# 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"
|
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
|
- name: Cleanup
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# run_docker_tests.sh
|
# run_tests_in_docker_environment.sh
|
||||||
#
|
#
|
||||||
# This script automates the entire process of testing the application
|
# This script automates the entire process of testing the application
|
||||||
# within its intended, privileged devcontainer environment. It is
|
# within its intended, privileged devcontainer environment. It is
|
||||||
Reference in New Issue
Block a user