fix: add Redis installation step and improve aitbc_crypto mocking in tests
Some checks failed
Production Tests / Production Integration Tests (push) Failing after 1m16s
Python Tests / test-python (push) Failing after 3m33s

- Added Redis server installation step in production-tests.yml workflow
  - Checks if Redis binaries are already available before installing
  - Installs redis-server package if needed
- Improved aitbc_crypto mocking in conftest.py
  - Try importing real aitbc_crypto module first before mocking
  - Only mock functions if they don't already exist
  - Prevents overriding real implementations when aitbc_crypto is available
This commit is contained in:
aitbc
2026-04-19 19:49:40 +02:00
parent 625c1b7812
commit 22a2597e23
2 changed files with 22 additions and 4 deletions

View File

@@ -52,6 +52,16 @@ jobs:
# Ensure standard directories exist
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
- name: Ensure Redis server
run: |
if command -v redis-server >/dev/null 2>&1 && command -v redis-cli >/dev/null 2>&1; then
echo "✅ Redis binaries already available"
exit 0
fi
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y redis-server
- name: Start Redis
run: |
redis-server --daemonize yes --port 6379