fix: add Redis installation step and improve aitbc_crypto mocking in tests
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user