From 640bbd95c1a2162cdd326ed7300b634001cbdf37 Mon Sep 17 00:00:00 2001 From: Adam Outler Date: Sun, 18 Jan 2026 16:02:48 -0500 Subject: [PATCH] Enhance API_TOKEN retrieval instructions in tests Updated instructions for retrieving API_TOKEN in tests. --- .gemini/GEMINI.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gemini/GEMINI.md b/.gemini/GEMINI.md index 87fd0857..c55c6c3f 100644 --- a/.gemini/GEMINI.md +++ b/.gemini/GEMINI.md @@ -47,7 +47,10 @@ docker exec bash -c "cd /workspaces/NetAlertX && pytest test/api_ ``` ### Authentication in Tests -The test environment uses `API_TOKEN` defined in `app.conf`. Tests usually retrieve this via `helper.get_setting_value('API_TOKEN')`. Ensure `app.conf` is populated (the `setup.sh` script does this). +The test environment uses `API_TOKEN`. The most reliable way to retrieve the current token from a running container is: +```bash +docker exec python3 -c "from helper import get_setting_value; print(get_setting_value('API_TOKEN'))" +``` *Troubleshooting:* If tests fail with 403 Forbidden or empty tokens: 1. Verify server is running and use the aforementioned setup.sh if required.