Compare commits

..

1 Commits

Author SHA1 Message Date
889425764c feat: initial version
Some checks failed
Test Stalwart Installation Action / Error Handling Tests (pull_request) Successful in 22s
Test Stalwart Installation Action / Full Configuration (Domains + Users) (pull_request) Failing after 42s
Test Stalwart Installation Action / Basic Installation (No Config) (pull_request) Successful in 51s
Test Stalwart Installation Action / Test Summary (pull_request) Failing after 3s
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-02-15 01:23:56 -05:00

View File

@@ -162,6 +162,52 @@ jobs:
echo "::error::API not accessible after 60 seconds"
exit 1
- name: Verify created user can authenticate
run: |
echo "Testing user authentication via JMAP endpoint..."
# Test user1@test1.local authentication
JMAP_RESPONSE=$(curl -sf \
-u "user1@test1.local:UserPass123!" \
"http://localhost:8080/.well-known/jmap")
echo "JMAP Response: $JMAP_RESPONSE"
# Verify username field contains our test user
USERNAME=$(echo "$JMAP_RESPONSE" | jq -r '.username // empty')
if [ "$USERNAME" = "user1@test1.local" ]; then
echo "✓ User authentication successful: $USERNAME"
else
echo "::error::Expected username 'user1@test1.local', got '$USERNAME'"
exit 1
fi
# Verify accounts object is not empty (means user is authenticated)
ACCOUNTS=$(echo "$JMAP_RESPONSE" | jq '.accounts // {}')
if [ "$ACCOUNTS" != "{}" ]; then
echo "✓ User has active accounts"
else
echo "::error::User accounts are empty (authentication may have failed)"
exit 1
fi
- name: Verify unauthenticated JMAP access
run: |
echo "Testing unauthenticated JMAP endpoint..."
# Call without authentication
JMAP_RESPONSE=$(curl -sf "http://localhost:8080/.well-known/jmap")
# Verify username is empty (no authentication)
USERNAME=$(echo "$JMAP_RESPONSE" | jq -r '.username // empty')
if [ -z "$USERNAME" ]; then
echo "✓ Unauthenticated access returns empty username"
else
echo "::warning::Expected empty username for unauthenticated request, got '$USERNAME'"
fi
- name: Show logs on failure
if: failure()
run: |