Commit Graph

128 Commits

Author SHA1 Message Date
Jake Barnby d2e4ed6a11 test(messaging): skip users recipient test when push DSN not configured
CI lacks _APP_MESSAGE_PUSH_TEST_DSN, so new DSN(null) threw a TypeError
before the existing skip guard could run. Match the pattern used by
testSendPushNotification: gate on the env var first, then construct the DSN.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 22:58:29 +12:00
copilot-swe-agent[bot] 2a47ccc0f9 test(messaging): add users recipient e2e coverage and fix user target query limit
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/8ea97768-3304-4a3c-81e2-d62d6fe3ad80

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-11 10:03:02 +00:00
Chirag Aggarwal f2ea0b9b48 Fix PHPStan baseline cleanup issues (part 2) 2026-04-01 10:20:20 +05:30
Jake Barnby bada1a7c05 Timing updates 2026-02-24 14:00:07 +13:00
Jake Barnby 64a368ba3d Merge remote-tracking branch 'origin/feat-db-tests' into feat-mongodb
# Conflicts:
#	.github/workflows/tests.yml
#	src/Appwrite/Utopia/Response.php
#	src/Appwrite/Utopia/Response/Model/AttributeList.php
#	tests/e2e/Client.php
#	tests/e2e/Scopes/ProjectCustom.php
#	tests/e2e/Services/Databases/DatabasesBase.php
#	tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php
#	tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php
#	tests/e2e/Services/Databases/Legacy/DatabasesStringTypesTest.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesBase.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesCustomClientTest.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesCustomServerTest.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesStringTypesTest.php
#	tests/e2e/Services/Databases/Transactions/TransactionsBase.php
#	tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php
#	tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php
#	tests/e2e/Services/Messaging/MessagingBase.php
#	tests/e2e/Services/Sites/SitesBase.php
#	tests/e2e/Services/Sites/SitesCustomServerTest.php
2026-02-18 03:27:23 +13:00
Jake Barnby ab19a73b33 fix: adjust messaging scheduledAt timings for CI reliability
Set initial schedule to 20s and reschedule to 10s to balance between:
- Not being picked up by scheduler before reschedule (3-4s interval)
- Providing enough margin (6s) after scheduledAt for processing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 02:00:09 +13:00
Jake Barnby f7ba5e39b7 fix: update Sequence validator, fix messaging race condition, improve auth retry
- Update utopia-php/database to fix Sequence validator rejecting integer
  $sequence values on MongoDB (VAR_UUID7) adapters
- Fix Base.php Filter constructor passing APP_DATABASE_QUERY_MAX_VALUES
  as $idAttributeType instead of the correct Database::VAR_INTEGER
- Fix Messaging testUpdateScheduledAt race condition by increasing
  initial scheduledAt from 3s to 30s so scheduler doesn't fire before
  the PATCH update processes
- Improve Functions callWithAuthRetry to refresh project credentials
  after 4 consecutive 401 failures and increase max retries to 10

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 23:54:39 +13:00
Jake Barnby e319feb1d4 fix: Fix relationship twoWayKey, hardcoded IDs, and datetime format issues
- Set explicit twoWayKey in testOneToOneRelationship to avoid auto-generated ID
- Replace hardcoded person10/library10/11 IDs with ID::unique() in setupOneToManyRelationship
- Fix remaining datetime format comparison in testUpdateScheduledAt
- Use assertStringContainsString for Projects mock numbers excess items test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:28:38 +13:00
Jake Barnby 1b9d0ca1c6 fix: Fix remaining parallel-safety issues from CI iteration 2
- Fix DB relationship tests: use ID::unique() for person/library collections
- Fix DB StringTypesTest: use waitForAllAttributes instead of sleep(3)
- Fix DB permissions tests: update expected counts for parallel mode
- Fix Account OAuth tests: clean up shared mock OAuth email before use
- Fix Account phone tests: ensure phone auth enabled, unique phone numbers
- Fix Messaging: compare datetime via timestamps, accept processing state
- Fix GraphQL testGetColumn: call setupStringColumn instead of setupTable
- Fix Projects: update mock numbers error message assertion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:55:41 +13:00
Jake Barnby 161e4e53d4 fix: Address remaining parallel-safety failures across all test suites
- Fix Legacy DatabasesStringTypesTest with project-keyed setup cache
- Fix Account OTP test with unique email, phone session re-login
- Fix GraphQL setup methods with sleep, 409 handling, missing columns
- Fix Databases list/pagination tests with document ID filtering
- Fix Permissions tests with assertGreaterThanOrEqual for counts
- Fix Messaging scheduled tests to not depend on scheduler timing
- Increase Realtime WebSocket timeout to 60s and assertEventually to 30s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:20:42 +13:00
Jake Barnby 2da4211f69 fix: Make E2E tests parallel-safe for functional mode
- Fix missing return statement in DatabasesBase::testListDocuments
- Rewrite DatabasesStringTypesTest with project-keyed setup cache
- Use assertGreaterThanOrEqual in Functions testListDeployments
- Clean up OIDC provider after Account OAuth2 test
- Key all GraphQL static caches by project ID with unique IDs
- Replace sleep() with assertEventually in Realtime tests
- Increase Messaging scheduled message timeout to 180s
- Increase Sites deployment timeouts to 120s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:25:19 +13:00
Jake Barnby a2ae55dcbe fix: Improve parallel test isolation for Account, Storage, Messaging
- Account: Add createFreshAccountWithSession() for predictable session/log counts
- Account: Update testGetAccountSessions and testGetAccountLogs to use fresh accounts
- Storage: Fix testListBucket to find bucket by ID instead of assuming first position
- Messaging: Fix testListSubscribers to find subscriber by ID instead of assuming first position

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:24:28 +13:00
Jake Barnby f624646480 perf: Remove @depends from Account, Functions, Storage, Users, VCS, Messaging tests
Added helper methods with static caching to enable parallel test execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:54:14 +13:00
Jake Barnby 2c5dee0fdd fix: resolve test failures in Databases, Functions, Messaging, Storage
- Fix typo CLient -> Client in DatabasesBase.php:4568
- Fix typo CLient -> Client in StorageCustomClientTest.php:428
- Fix cleanupFunction() call with extra parameter in FunctionsScheduleTest.php:175
- Increase message scheduling test timeouts from 30s to 180s for CI stability

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 04:03:40 +13:00
Jake Barnby 0cc3db6095 Fix flaky test timing issues
- Increase SchemaPolling default timeout from 60s to 120s
- Replace hardcoded sleep() with assertEventually() for message status polling in Messaging tests
2026-01-16 22:57:05 +13:00
Jake Barnby 7498c330eb Add missing PHPUnit #[Depends] to Functions, Messaging, Webhooks tests
Fixed missing #[Depends] attributes:
- FunctionsCustomServerTest: testCancelDeploymentBuild → testCreateDeployment
- MessagingBase: testDeleteMessage → testSendEmail
- WebhooksBase: testDeleteDocument → testUpdateDocument, testDeleteRow → testUpdateRow
- WebhooksCustomClientTest: testUpdateAccountName → testDeleteAccountSessions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 18:18:55 +13:00
Jake Barnby 714b8d7ea6 Migrate to PHPUnit 11 2026-01-15 16:14:53 +13:00
shimon a7dbb3daea Refactor API parameters to replace 'includeTotal' with 'total' across multiple endpoints for consistency in response handling. 2025-10-29 11:08:08 +02:00
shimon b760a88af7 Merge branch '1.8.x', commit 'ab1e51034826dde50034e6e73fc5d546e800dd6d' of github.com:appwrite/appwrite into feat-disable-count
# Conflicts:
#	composer.lock
2025-10-27 10:13:37 +02:00
Chirag Aggarwal 9c0772f125 add tests 2025-10-24 14:19:59 +05:30
shimon 5f3316ff18 fix assertion order 2025-10-20 18:38:14 +03:00
shimon fb4e3e1b9d Implement 'includeTotal' parameter across multiple API endpoints to control total count in responses, ensuring consistent behavior in session, log, and membership retrievals. 2025-10-20 18:18:17 +03:00
Jake Barnby b418285349 Revert "Merge pull request #10299 from appwrite/feat-functions-redis-queue"
This reverts commit f81fd16d26, reversing
changes made to ec174a15cf.
2025-08-12 23:57:54 +12:00
Matej Bačo 100ab4ef89 Fix flakyness 2025-08-11 15:36:11 +02:00
Steven Nguyen 3a3a0594dc fix(messaging): disable validation for subquery to prevent error
If there are more than 100 targets, the validation throws an error. This
change skips the validation so no error is thrown.
2024-06-24 23:38:41 +00:00
Steven Nguyen b75f5263a2 Merge branch 'main' into chore-sync-main-into-1.5.x 2024-04-23 23:43:53 +00:00
Eldad Fux 8ed1da4ea8 Updated getEnv to use system lib 2024-04-01 13:02:47 +02:00
Jake Barnby 2d03fc1ce0 Fix msg91 params 2024-03-13 15:42:16 +01:00
Jake Barnby 6a795f4d7a Fix tests 2024-03-08 12:42:15 +01:00
Jake Barnby 7d3f8a80ea Push SDKs 2024-03-08 10:58:46 +01:00
Jake Barnby 518a9fef73 Fix tests 2024-02-27 00:44:46 +13:00
Jake Barnby 7945f1398f Fix tests 2024-02-27 00:27:35 +13:00
Jake Barnby 564c1df701 Fix rescheduling with existing schedule 2024-02-26 23:37:12 +13:00
Jake Barnby 0a37a0dd20 Merge pull request #7645 from appwrite/feat-dev-apns
Allow setting APNS to sandbox mode
2024-02-24 14:07:20 +13:00
Jake Barnby 0ccdce8feb Add test 2024-02-24 13:46:45 +13:00
Jake Barnby d311f88307 Add test 2024-02-24 00:01:46 +13:00
Jake Barnby ca1d66fc7e Fix test 2024-02-21 13:31:48 +13:00
Jake Barnby 81d475d98b Add test 2024-02-21 13:16:25 +13:00
Jake Barnby 142e92b4b8 Update tests 2024-02-15 17:30:09 +13:00
Jake Barnby ae7a5c6c9c Merge pull request #7580 from appwrite/feat-subscribe-permission
Feat subscribe permission
2024-02-15 16:47:44 +13:00
Jake Barnby b2f119868d Add test 2024-02-13 17:41:07 +13:00
Jake Barnby 13ea6787cb Merge remote-tracking branch 'origin/1.5.x' into fix-smtp-provider-update
# Conflicts:
#	tests/e2e/Services/Messaging/MessagingBase.php
2024-02-13 15:21:15 +13:00
Jake Barnby 7b791aa371 Fix telesign test 2024-02-13 15:20:10 +13:00
Jake Barnby 01e88e65d6 Fix swapping options/credentials on create/update smtp provider 2024-02-13 15:16:37 +13:00
fogelito 6aae8cbf64 Add cursor test 2024-02-12 15:27:19 +02:00
Jake Barnby 3bb2016598 Fix tests 2024-02-02 18:48:34 +13:00
Jake Barnby e4194c690f Merge remote-tracking branch 'origin/1.5.x' into feat-smtp-provider
# Conflicts:
#	composer.lock
2024-02-01 01:50:36 +13:00
Jake Barnby d9f53cacfa Add SMTP provider 2024-02-01 01:30:09 +13:00
Jake Barnby 39312a83ef Merge pull request #7518 from appwrite/feat-remove-description
Feat remove description
2024-02-01 00:33:49 +13:00
Jake Barnby d7c9f9df59 Merge remote-tracking branch 'origin/1.5.x' into feat-remove-description 2024-01-30 16:58:20 +13:00