chore: clean publish artifacts and add sources
This commit is contained in:
40
test-product-save.sh
Executable file
40
test-product-save.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# Test script to verify product save functionality
|
||||
|
||||
echo "Testing Product Save Functionality"
|
||||
echo "===================================="
|
||||
echo ""
|
||||
|
||||
# Test 1: Check if create page loads
|
||||
echo "Test 1: Checking if product create page loads..."
|
||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:5000/admin/products/create)
|
||||
if [ "$HTTP_CODE" == "200" ] || [ "$HTTP_CODE" == "302" ]; then
|
||||
echo "✅ Create page accessible (HTTP $HTTP_CODE)"
|
||||
else
|
||||
echo "❌ Create page failed (HTTP $HTTP_CODE)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 2: Check if form has antiforgery token
|
||||
echo "Test 2: Checking if form includes antiforgery token..."
|
||||
if curl -s http://localhost:5000/admin/products/create | grep -q "AntiForgeryToken\|__RequestVerificationToken"; then
|
||||
echo "✅ Antiforgery token found in form"
|
||||
else
|
||||
echo "⚠️ Antiforgery token not found (may require authentication)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 3: Monitor logs for errors
|
||||
echo "Test 3: Monitoring application logs for recent errors..."
|
||||
echo "Recent application logs:"
|
||||
journalctl -u skyartshop.service -n 10 --no-pager --since "1 minute ago" | grep -i "error\|exception" || echo "✅ No errors in recent logs"
|
||||
echo ""
|
||||
|
||||
echo "===================================="
|
||||
echo "Test complete!"
|
||||
echo ""
|
||||
echo "To test product save manually:"
|
||||
echo "1. Navigate to https://skyarts.ddns.net/admin/products/create"
|
||||
echo "2. Fill in product details (Name and Price are required)"
|
||||
echo "3. Click 'Save Product'"
|
||||
echo "4. Check logs with: journalctl -u skyartshop.service -f"
|
||||
Reference in New Issue
Block a user