Commit graph

260 commits

Author SHA1 Message Date
Jake Barnby
b3eecac6f9 fix: Add error details to assertions and handle 409 in relationship setup
- Add response body to assertion messages for debugging 400/409 errors
- Re-add 409 handling for relationship creation (race condition in parallel mode)
- Use explicit fullName: null instead of empty data for null person documents

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:56:08 +13:00
Jake Barnby
d617f89642 fix: Fix parallel test failures across Databases, GraphQL, Realtime, and Account
- DatabasesBase: Wait for twoWayKey attribute on library collection in
  setupOneToManyRelationship; use server API key headers for document creation
- DatabasesStringTypesTest: Add delays between attribute creation batches to
  avoid overwhelming the database worker
- SchemaPolling: Improve waitForAllAttributes error messaging
- GraphQL UsersTest: Use fresh user in testDeleteUserSession to avoid
  session conflicts
- Realtime: Increase WebSocket timeout to 120s and index polling to 60s
- Account: Add better error reporting for phone session creation failures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:08:55 +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
3b025fa12a fix: Make testCreateAttributes and testCreateIndexes parallel-safe
These tests were creating resources directly in the shared collections,
which conflicts with setupAttributes() and setupIndexes() when tests
run in parallel. Now each test creates its own dedicated collection
to avoid conflicts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 18:50:36 +13:00
Jake Barnby
62e0598008 fix: Remove more invalid returns from void test methods
Removed return statements from testManyToOneRelationship and
testManyToManyRelationship which were declared as void. These
cause PHP fatal errors in PHP 8.4+.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:46:42 +13:00
Jake Barnby
fd0a4a0e88 fix: Remove invalid return from void testUpdateDocument method
The testUpdateDocument method was declared as void but returned [].
This causes a PHP fatal error in PHP 8.4.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:36:20 +13:00
Jake Barnby
e976617869 perf: Remove @depends from Databases permissions and partial GraphQL tests
- Added setupDatabase() helper with caching to all permission test files
- Removed @depends from LegacyPermissionsMemberTest, LegacyPermissionsTeamTest
- Removed @depends from TablesDBPermissionsMemberTest, TablesDBPermissionsTeamTest
- Partial GraphQL test updates from agents

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:56:58 +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
c8d2cc090e Merge remote-tracking branch 'origin/1.8.x' into feat-db-tests
# Conflicts:
#	tests/e2e/Services/Databases/DatabasesBase.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesBase.php
2026-02-06 01:29:44 +13:00
Jake Barnby
6f6ea94a19 fix: make testUpdateWithExistingRelationships self-contained
Remove @depends annotation and create a new database within the test
to fix compatibility with PHPUnit 12 and paratest parallel execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 01:30:52 +13:00
Jake Barnby
63b3365ce9 Fix PHPUnit 11 migration test issues
- Add missing @depends testCreateDatabase to testUpdateWithExistingRelationships in DatabasesBase.php
- Fix data provider keys in LegacyPermissionsMemberTest and TablesDBPermissionsMemberTest to match parameter names (any->anyCount, users->usersCount, doconly->docOnlyCount)
- Convert provideCustomExecutions data provider to positional arrays to avoid PHPUnit 11 named argument conflicts with @depends
- Restore @depends testUpdateAccountPhone for testCreatePhoneVerification in GraphQL AccountTest

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 18:59:53 +13:00
Jake Barnby
714b8d7ea6 Migrate to PHPUnit 11 2026-01-15 16:14:53 +13:00
Jake Barnby
f797ae3ac6 Remove sleeps 2026-01-10 14:53:29 +13:00
Jake Barnby
9498a8ba5d Consolidate, remove depends, add fixtures 2026-01-10 03:21:31 +13:00
Darshan
c5074fd52f update: move around tests. 2025-05-08 19:53:31 +05:30
Darshan
6e8dbfc674 update: documents <> rows errors. 2025-05-06 16:48:20 +05:30
Darshan
9ec897f7d6 fix: filtering 2025-05-06 12:05:06 +05:30
Darshan
9e1105b61f update: tests. 2025-05-06 11:29:56 +05:30
Darshan
75c9db8031 update: tests to use the 1.7.x changes on databases. 2025-05-05 14:07:34 +05:30
Darshan
21715448ac fix|update: database tests for new error messages. 2025-04-26 16:07:32 +05:30
arnab
e6e28f32ff added comments for test case 2025-04-17 14:59:37 +05:30
arnab
fb6ec704a1 test case added 2025-04-17 14:44:59 +05:30
Jake Barnby
b9e8c1d8bc
Skip server console test 2025-04-16 13:07:11 +12:00
Chirag Aggarwal
9ebb4b9626
Merge branch '1.6.x' into pla-2428 2025-02-14 09:04:30 +05:30
fogelito
e4ae0d463d assertStringContainsString 2025-02-13 11:37:12 +02:00
fogelito
8778e2e666 lint 2025-02-13 11:35:16 +02:00
fogelito
8f212ccd30 in_array 2025-02-13 11:24:13 +02:00
fogelito
e8a306253b Fix test 2025-02-13 11:22:40 +02:00
fogelito
6abf8ce727 Fix index length test 2025-02-13 10:44:27 +02:00
fogelito
8c3a243a5d Typo 2025-02-10 15:40:45 +02:00
fogelito
7a8688932c Add test 2025-02-10 15:40:21 +02:00
Chirag Aggarwal
deb556242e chore: update test 2025-02-04 08:35:26 +00:00
Jake Barnby
f6658c4f5a
Merge remote-tracking branch 'origin/1.6.x' into check-cursor-value 2024-10-17 18:32:11 +13:00
Jake Barnby
16d65f32b3
Review fixes 2024-10-16 21:35:32 +13:00
fogelito
7a64987da7 Fix message 2024-10-15 17:25:10 +03:00
fogelito
c9e2be0e08 Fix failing test 2024-10-15 16:35:26 +03:00
Jake Barnby
8bc37026cd
Revert "Feat adding coroutines" 2024-10-08 20:54:40 +13:00
Binyamin Yawitz
d14edf4207
reverting: to set coroutines as head 2024-10-01 10:30:47 -04:00
Binyamin Yawitz
5512340cdd
Revert "Feat eldad4 coroutines" 2024-09-20 12:30:05 -04:00
Binyamin Yawitz
9e525366cb
Merge branch '1.6.x' into feat-eldad4-coroutines
# Conflicts:
#	app/controllers/api/functions.php
#	app/init.php
#	composer.lock
#	src/Appwrite/Specification/Format/Swagger2.php
2024-09-05 18:09:16 -04:00
Binyamin Yawitz
439e42e1ab
review: addressing 2024-09-05 14:49:37 -04:00
Jake Barnby
501e7c2fa0
Add assertion 2024-09-05 14:28:15 +12:00
Binyamin Yawitz
7d6eac4ddb
Merge branch '1.6.x' into feat-eldad4-coroutines
# Conflicts:
#	app/cli.php
#	app/controllers/api/account.php
#	app/controllers/api/functions.php
#	app/controllers/api/projects.php
#	app/controllers/general.php
#	app/controllers/shared/api.php
#	app/http.php
#	app/init.php
#	app/realtime.php
#	app/worker.php
#	composer.json
#	composer.lock
#	src/Appwrite/Migration/Migration.php
#	src/Appwrite/Platform/Tasks/Migrate.php
#	src/Appwrite/Platform/Tasks/ScheduleExecutions.php
#	src/Appwrite/Platform/Workers/Builds.php
#	src/Appwrite/Platform/Workers/Deletes.php
#	src/Appwrite/Specification/Format/Swagger2.php
#	src/Appwrite/Utopia/Response.php
2024-09-03 19:06:48 -04:00
Damodar Lohani
d33048b792 adding 10 rows 2024-06-24 05:58:29 +00:00
Binyamin Yawitz
8795d72146
test: Temp database workaround for old PHP 2024-06-10 15:09:01 -04:00
Binyamin Yawitz
b5a241db8d
merge: Main into Coroutines 2024-06-05 18:38:39 -04:00
fogelito
661329b977 Invalid cursor value 2024-05-09 19:54:28 +03:00
Damodar Lohani
729db1aa17 fix date format 2024-05-09 03:08:27 +00:00
Eldad Fux
c53de9fb6b Merge branch 'main' of github.com:appwrite/appwrite into feat-eldad4-coroutines 2024-05-08 18:21:55 +01:00
Damodar Lohani
b27f70ee81 ignore few tests 2024-05-08 06:08:23 +00:00
Jake Barnby
aeea5e8328
Merge pull request #7341 from appwrite/collection-not-found
databases.php collection not found
2024-04-29 21:04:31 +12:00
Jake Barnby
ab7a5f4575
Fix test 2024-04-29 19:07:16 +12:00
Matej Bačo
9616de7576 Merge branch 'main' into refactor-usage-sn-1.5.x 2024-04-26 13:11:21 +02:00
Jake Barnby
476074cc5b
Add test 2024-04-23 15:20:25 +12:00
fogelito
e15afe65c0 Fix error 2024-04-18 11:33:17 +03:00
fogelito
6c92962468 composer.lock 2024-04-18 11:29:57 +03:00
fogelito
0e8bc6b4b4 Fix bad copy 2024-04-18 11:25:03 +03:00
fogelito
a7318fdf8b Chnage message 2024-04-18 09:26:11 +03:00
fogelito
f73f8c9ae1 Move test tp base 2024-04-09 18:24:01 +03:00
Matej Bačo
d091b37a15 Merge branch 'refactor-usage-sn' into refactor-usage-sn-1.5.x 2024-04-02 18:42:17 +02:00
fogelito
b7103e9462 tests serviceStatusForDatabases 2024-03-21 22:59:09 +02:00
fogelito
cdb521a311 Try to reproduce 2024-03-21 22:23:19 +02:00
fogelito
d1be965e8c disable serviceStatusForDatabases 2024-03-21 22:20:39 +02:00
Damodar Lohani
b409efc492 fix path 2024-03-10 08:01:10 +00:00
Matej Bačo
efeb898be1 Import fixes 2024-03-07 15:29:42 +01:00
Torsten Dittmann
0a1d572c72 chore: run formatter 2024-03-06 18:34:21 +01:00
Damodar Lohani
5f4970befd fix path 2024-03-04 12:49:56 +00:00
Damodar Lohani
86dc85f3a4 fix file path 2024-03-04 12:17:35 +00:00
Jake Barnby
44ec1502f0
Merge remote-tracking branch 'origin/main' into 1.5.x 2024-02-26 18:35:25 +13:00
Utkarsh Ahuja
faeb9aa8d4 tests: internal id in query select 2024-02-25 14:22:12 +00:00
Jake Barnby
957f08a3ef
Fix max int test 2024-02-24 01:55:00 +13:00
fogelito
6c064430fb Merge branch '1.5.x' of github.com:appwrite/appwrite into json_syntax_error 2024-02-12 17:41:42 +02:00
fogelito
103fec1664 parseQueries 2024-02-08 18:10:25 +02:00
fogelito
98a6b96af9 Hardcode size and orders 2024-02-08 15:01:20 +02:00
fogelito
a782e20315 Merge branch '1.5.x' of github.com:appwrite/appwrite into json-parsing
 Conflicts:
	app/controllers/api/account.php
	composer.json
	composer.lock
	src/Appwrite/Platform/Tasks/CalcTierStats.php
	tests/e2e/Services/Account/AccountBase.php
2024-01-25 17:44:05 +02:00
Bradley Schofield
2b31c76918 Update DatabasesBase.php 2024-01-25 10:04:41 +00:00
Torsten Dittmann
80193175f1 test: fix database validator descriptions 2024-01-24 15:56:43 +01:00
fogelito
667abce8f5 Create indexes & query contains 2024-01-21 18:22:02 +02:00
fogelito
3689435176 Arrays tests 2024-01-21 10:10:18 +02:00
Jake Barnby
51b2019ab6
Merge remote-tracking branch 'origin/1.5.x' into json-parsing
# Conflicts:
#	composer.lock
2024-01-09 13:56:01 +13:00
fogelito
dc203a494e Syntax change 2023-12-20 12:55:09 +02:00
Jake Barnby
121521d7c5
Merge remote-tracking branch 'origin/1.5.x' into json-parsing
# Conflicts:
#	composer.lock
#	src/Appwrite/Platform/Tasks/DeleteOrphanedProjects.php
#	src/Appwrite/Platform/Tasks/Hamster.php
2023-12-15 18:22:08 +13:00
fogelito
310baef77f $queries to String 2023-12-10 20:05:33 +01:00
Christy Jacob
28d00668bd fix: failing tests 2023-12-09 00:48:34 +01:00
Christy Jacob
aa7d1a87f4 fix: failing tests 2023-12-09 00:27:35 +01:00
fogelito
630debdb84 Test 2023-12-06 19:07:29 +01:00
fogelito
cc81553cc5 orQueriesTest 2023-12-06 18:19:11 +01:00
Prateek Banga
ab35b75c37 fix test message 2023-11-17 20:14:55 +05:30
Prateek Banga
228b813994 fixes test case 2023-11-17 20:06:28 +05:30
Jake Barnby
354211950f
Add timeout test 2023-10-19 17:06:57 +13:00
Jake Barnby
efd25d6a70
Merge remote-tracking branch 'origin/feat-git-integration' into feat-framework-router-v2
# Conflicts:
#	app/controllers/api/users.php
#	composer.json
#	composer.lock
#	tests/e2e/Services/Storage/StorageBase.php
2023-08-22 17:58:42 -04:00
Jake Barnby
942705b5f3
Fix database upgrade 2023-08-21 23:25:55 -04:00
Jake Barnby
7cd995ac3c
Apply suggestions from code review 2023-08-11 12:29:55 -04:00
prateek banga
02d4b6b612 fix test case by adding internal attributes 2023-08-10 15:14:23 +05:30
prateek banga
185d09d764 adds more queries in tests, upgrade db library 2023-08-10 00:11:18 +05:30
Damodar Lohani
18407ce6ff remove failing alias and alias tests 2023-07-31 05:53:27 +00:00
prateek banga
484ad8280e fixes test case assertion 2023-07-27 02:29:14 +05:30