Add build verification and test credential checking
- Build script now shows summary of embedded credentials after build - quick-test.sh now checks if binary has credentials before running - This prevents the "dial tcp :143" empty server error Tests if help output shows empty string in default values.
This commit is contained in:
1 parent
5dbebc0f44
commit
e49020b193
2 files changed
+41
-1
No files matched your search
@@ -135,6 +135,32 @@ go build \
|
|||||||
-o ~/bin/nextcloud-mail
|
-o ~/bin/nextcloud-mail
|
||||||
echo "✓ nextcloud-mail built successfully"
|
echo "✓ nextcloud-mail built successfully"
|
||||||
|
|
||||||
|
# Verification: Show what credentials were embedded
|
||||||
|
echo ""
|
||||||
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
echo " Build Verification Summary"
|
||||||
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
echo " IMAP Server: $IMAP_SERVER"
|
||||||
|
echo " IMAP Port: $IMAP_PORT"
|
||||||
|
echo " IMAP Username: $IMAP_USER"
|
||||||
|
echo " IMAP Password: [$(echo "$IMAP_PASS" | sed 's/./*/g')]"
|
||||||
|
echo " SMTP Server: $SMTP_SERVER"
|
||||||
|
echo " SMTP Port: $SMTP_PORT"
|
||||||
|
echo " SMTP Username: $SMTP_USER"
|
||||||
|
echo " SMTP Password: [$(echo "$SMTP_PASS" | sed 's/./*/g')]"
|
||||||
|
echo " Use SSL: $USE_SSL"
|
||||||
|
echo " Ignore Certs: $IGNORE_CERTS"
|
||||||
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if [ -z "$IMAP_USER" ] || [ -z "$IMAP_PASS" ]; then
|
||||||
|
echo "⚠️ Warning: IMAP username or password appears to be empty!"
|
||||||
|
echo " The binary was built but may not work correctly."
|
||||||
|
echo " If this is incorrect, please rebuild with valid credentials."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "All tools built successfully!"
|
echo "All tools built successfully!"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
+15
-1
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Quick Test Script for nextcloud-mail
|
# Quick Test Script for nextcloud-mail
|
||||||
# Usage: ./quick-test.sh <username>
|
# Usage: ./quick-test.sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -11,6 +11,20 @@ echo "========================================="
|
|||||||
echo "nextcloud-mail Quick Test Suite"
|
echo "nextcloud-mail Quick Test Suite"
|
||||||
echo "========================================="
|
echo "========================================="
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
# Check if binary has credentials before running
|
||||||
|
echo "Checking binary credentials..."
|
||||||
|
if ~/bin/nextcloud-mail --help 2>&1 | grep -q '"imap-server".*"\"\"'; then
|
||||||
|
echo "❌ Error: nextcloud-mail binary was built with empty credentials!"
|
||||||
|
echo " Please run ./build.sh again and provide valid IMAP/SMTP credentials."
|
||||||
|
echo ""
|
||||||
|
echo "Current binary shows:"
|
||||||
|
~/bin/nextcloud-mail --help 2>&1 | grep -A2 '"imap-server"'
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "✓ Binary has credentials configured"
|
||||||
echo "Username: $USERNAME"
|
echo "Username: $USERNAME"
|
||||||
echo "Test Directory: $TEST_DIR"
|
echo "Test Directory: $TEST_DIR"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in new issue
Block a user