mirror of
https://github.com/Zie619/n8n-workflows.git
synced 2025-11-24 19:12:59 +08:00
- Fix docker.yml Trivy configuration to use trivy.yaml and .trivyignore - Add QEMU setup for ARM64 multi-platform builds - Upgrade to Python 3.12.7 for latest security patches - Update all dependencies to latest secure versions - Add security hardening to Dockerfile - Fix multi-platform Docker build issues This addresses all reported CVEs and CI/CD failures.
40 lines
1.7 KiB
Bash
Executable File
40 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "🔍 Testing API Functionality..."
|
|
echo "========================================="
|
|
|
|
# Test search
|
|
echo "1. Testing search for 'Slack'..."
|
|
results=$(curl -s "http://localhost:8000/api/workflows?search=Slack" | python3 -c "import sys, json; data=json.load(sys.stdin); print(len(data['workflows']))")
|
|
echo " Found $results workflows mentioning Slack"
|
|
|
|
# Test categories
|
|
echo ""
|
|
echo "2. Testing categories endpoint..."
|
|
categories=$(curl -s "http://localhost:8000/api/categories" | python3 -c "import sys, json; data=json.load(sys.stdin); print(len(data['categories']))")
|
|
echo " Found $categories categories"
|
|
|
|
# Test integrations
|
|
echo ""
|
|
echo "3. Testing integrations endpoint..."
|
|
integrations=$(curl -s "http://localhost:8000/api/integrations" | python3 -c "import sys, json; data=json.load(sys.stdin); print(len(data['integrations']))")
|
|
echo " Found $integrations integrations"
|
|
|
|
# Test filters
|
|
echo ""
|
|
echo "4. Testing filter by complexity..."
|
|
high_complex=$(curl -s "http://localhost:8000/api/workflows?complexity=high" | python3 -c "import sys, json; data=json.load(sys.stdin); print(len(data['workflows']))")
|
|
echo " Found $high_complex high complexity workflows"
|
|
|
|
# Test pagination
|
|
echo ""
|
|
echo "5. Testing pagination..."
|
|
page2=$(curl -s "http://localhost:8000/api/workflows?page=2&per_page=10" | python3 -c "import sys, json; data=json.load(sys.stdin); print(f\"Page {data['page']} of {data['pages']}, {len(data['workflows'])} items\")")
|
|
echo " $page2"
|
|
|
|
# Test specific workflow
|
|
echo ""
|
|
echo "6. Testing get specific workflow..."
|
|
workflow=$(curl -s "http://localhost:8000/api/workflows/1" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data['name'] if 'name' in data else 'NOT FOUND')")
|
|
echo " Workflow: $workflow"
|