[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] Tiki API: Implement Integration Tests for Tiki core API

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a30eea6e7da1_381978285534d@gitlab-sidekiq-low-urgency-cpu-bound-v2-68f746c689-6hfwj.mail>

Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
ebdb7cbf by Bruno Kambere at 2026-06-16T06:16:28+00:00
[ENH] Tiki API: Implement Integration Tests for Tiki core API
---
* [FIX] Fix PHP/PHPUnit warnings and deprecations in unit-tests-api CI job

* [FIX] Fix PHP warnings and notices in API integration tests

* [FIX] Restore TikiBoolean $ref in schemas and improve ApiSchemaLoader

* [ENH] Expand and refactor OpenAPI response schemas for API endpoints

* [ENH] Implement ApiSchemaLoader for dynamic schema loading in API tests

* [ENH] Update and refactor OpenAPI schema definitions for Tiki API endpoints

* [ENH] Add unique identifiers to group and category names in API integration tests for better isolation

* [FIX] Use Symfony Process in API tests, guard TIKI_API, fix tabular checks and test isolation

* [ENH] Update CI configuration for API tests: adjust PHP versions and exclude abstract test classes

* [ENH] Refactor API test preferences management and remove unused test method

* [ENH] Enhance null checks in various files for to reduce warnings in tests

* [FIX] Fix tracker test data creation hanging in CI

* [ENH] Increase timeout for API tests and synchronize preferences for CI environment

* [ENH] Update API integration tests: refine test filters and exclude abstract API classes

* [ENH] Enhance API integration tests with timeout handling and additional test filters

* [ENH] Add API integration tests to CI configuration and PHPUnit groups

* [ENH] Refactor API test cases to improve code clarity and maintainability

* [ENH] Update API tests to improve response validation

* [ENH] Add integration tests for Wiki API POST and PATCH endpoints

* [ENH] Add integration tests for Wiki API GET endpoints

* [ENH] Add integration tests for Users API POST endpoints

* [ENH] Add integration tests for Users API GET endpoints

* [ENH] Add integration tests for Translations API GET and POST endpoints

* [ENH] Add integration tests for Trackers API POST endpoints

* [ENH] Add integration tests for Trackers API GET endpoints

* [ENH] Add integration tests for Trackers API DELETE endpoints

* [ENH] Refactor preference setting in API test cases to use setTestPreference method

* [ENH] Update API token service setup and define TIKI_API in bootstrap for test environment

* [REF] Remove testApiGetGroupsWithCombinedFilters method from ApiGroupsGetTest

* [ENH] Enable API token service in database during setup for subprocesses

* [ENH] Add ApiBaseTrackersTest class for API integration testing of trackers

* [ENH] Enhance schema validation in ApiTestCase to support wildcard entries

* [ENH] Add API wrapper and local database credentials file to safePaths for testing

* FIX] Resolve pipeline failures

* [ENH] Refactor gallery file sorting test

* [ENH] Improve file handling in API tests to support DELETE requests and enhance error reporting

* [FIX] Correct path for ScopeEntity inclusion in ScopeRepository and remove redundant inclusion in ScopeEntity

* [ENH] Update Comments handling in API integration tests to ensure valid replies_info structure and improve item creation logic

* [ENH] Enhance API integration tests for Categories to handle invalid object formats

* [ENH] Add API integration tests for Tabulars delete endpoint

* [ENH] Refactor file upload handling in TabularController and update API test wrapper for improved file processing

* [ENH] Add API integration tests for Tabulars POST endpoints and improve error handling

* [ENH] Add API integration tests for Tabulars endpoints and implement error handling

* [ENH] Add API integration tests for Search endpoints

* [ENH] Add API integration tests for Groups DELETE endpoint

* [ENH] Add API integration tests for Groups endpoints

* [ENH] Update namespace for API gallery tests to maintain consistency

* [ENH] Improve sorting logic and add search gallery test in API integration tests

* [ENH] Update error message for non-existent file response in API tests

* [ENH] Add DELETE endpoint tests for File Galleries API and improve error handling

* [ENH] Add error handling for non-existent galleries and files in API endpoints

* [ENH] Add lock/unlock file API tests

* [ENH] Add integration tests for File Galleries API POST endpoints

* [ENH] Add file upload response schema and validation assertions

* [ENH] Add support for multipart/form-data in API request handling

* [ENH] Add error handling for file and gallery duplication by checking existence before proceeding

* [ENH] Improve file gallery moving logic by checking move result and throwing exception on failure

* [ENH] Add integration tests for File Galleries API GET endpoints and improve error handling

* [ENH] Refactor API test files to use namespace

* [ENH] Improve error handling in Comments API endpoints

* [ENH] Add integration tests for Comments API locking, moderation, and archiving features

* [ENH] Add validation for comment approval and archiving states to prevent duplicate actions

* [ENH] Add integration tests for Comments API DELETE and POST endpoints, enhance response validation

* [ENH] Add integration tests for Comments API GET endpoints and enhance error response validation

* [ENH] Add ApiBaseCommentsTest class for Comments API integration tests

* [ENH] Simplify category response validation and enhance assertions in API tests

* [ENH] Add schema validation methods for API response assertions

* [ENH] Rename test methods in Categories API tests for consistency

* [ENH] Refactor API request handling and enhance category management tests

* [REF] Remove API routing logic for built-in PHP server

* [ENH] Remove ApiTestServer class

* [ENH] Enhance  integration tests for Categories GET endpoints

* [ENH] Enhance integration tests for OAuth /oauth/public-key endpoint

* [ENH] Enhance integration tests for /version endpoint

* [REF] Run ApiTestCase in sub-process for isolation

* Refactor ApiTestCase and ApiTestServer for improved clarity and functionality

* Add routing support for API endpoints in CLI server

* Refactor VersionTikiTest to extend ApiTestCase

* Add ApiTestCase and ApiTestServer classes for API integration testing

* Add test cases for posting and retrieving comments

* Refactor CategoriesTest class and remove unused variable

* Expand Category test coverage, and add categorize/uncategorize test cases

* Refactor API endpoint calls and expand Category test coverage with additional test cases

* Add CategoriesTest class

* Add VersionTikiTest class for testing getVersion() method

* Add OauthPublicKeyTest class for testing the getPublicKey method

See merge request tikiwiki/tiki!4708

- - - - -


151 changed files:

- .gitlab-ci.yml
- doc/devtools/securitycheck.php
- lib/articles/artlib.php
- lib/core/Search/MySql/Table.php
- lib/core/Services/Comment/Controller.php
- lib/core/Services/File/Controller.php
- lib/core/Services/Group/Controller.php
- lib/core/Services/Tracker/TabularController.php
- lib/core/Services/User/Controller.php
- lib/core/Tiki/Smarty/SmartyTiki.php
- lib/oauthserver/entities/ScopeEntity.php
- lib/oauthserver/repositories/ScopeRepository.php
- + lib/test/api/ApiSchemaLoader.php
- + lib/test/api/ApiTestCase.php
- + lib/test/api/ApiTikiVersionTest.php
- + lib/test/api/categories/ApiBaseCategoriesTest.php
- + lib/test/api/categories/ApiCategoriesGetTest.php
- + lib/test/api/categories/ApiCategoriesPostTest.php
- + lib/test/api/categories/ApicategoriesDeleteTest.php
- + lib/test/api/comments/ApiBaseCommentsTest.php
- + lib/test/api/comments/ApiCommentsDeleteTest.php
- + lib/test/api/comments/ApiCommentsGetTest.php
- + lib/test/api/comments/ApiCommentsPostTest.php
- + lib/test/api/galleries/ApiBaseGalleriesTest.php
- + lib/test/api/galleries/ApiGalleriesDeleteTest.php
- + lib/test/api/galleries/ApiGalleriesGetTest.php
- + lib/test/api/galleries/ApiGalleriesPostTest.php
- + lib/test/api/galleries/assets/testdata.png
- + lib/test/api/groups/ApiBaseGroupsTest.php
- + lib/test/api/groups/ApiGroupsDeleteTest.php
- + lib/test/api/groups/ApiGroupsGetTest.php
- + lib/test/api/groups/ApiGroupsPostTest.php
- + lib/test/api/oauth/ApiOauthPublicKeyTest.php
- + lib/test/api/search/ApiBaseSearchTest.php
- + lib/test/api/search/ApiSearchGetTest.php
- + lib/test/api/search/ApiSearchPostTest.php
- + lib/test/api/tabulars/ApiBaseTabularsTest.php
- + lib/test/api/tabulars/ApiTabularsDeleteTest.php
- + lib/test/api/tabulars/ApiTabularsGetTest.php
- + lib/test/api/tabulars/ApiTabularsPostTest.php
- + lib/test/api/tabulars/assets/testdata.csv
- + lib/test/api/tiki-api-wrapper.php
- + lib/test/api/trackers/ApiBaseTrackersTest.php
- + lib/test/api/trackers/ApiTrackersDeleteTest.php
- + lib/test/api/trackers/ApiTrackersGetTest.php
- + lib/test/api/trackers/ApiTrackersPostTest.php
- + lib/test/api/translations/ApiBaseTranslationsTest.php
- + lib/test/api/translations/ApiTranslationsGetTest.php
- + lib/test/api/translations/ApiTranslationsPostTest.php
- + lib/test/api/users/ApiBaseUsersTest.php
- + lib/test/api/users/ApiUsersGetTest.php
- + lib/test/api/users/ApiUsersPostTest.php
- + lib/test/api/wiki/ApiBaseWikiTest.php
- + lib/test/api/wiki/ApiWikiGetTest.php
- + lib/test/api/wiki/ApiWikiPostTest.php
- lib/test/bootstrap.php
- lib/tikilib.php
- lib/trackers/trackerlib.php
- phpunit.xml.dist
- templates/api/docs/paths/categories/uncategorize.yaml
- templates/api/docs/paths/comments/entity.yaml
- templates/api/docs/paths/comments/index.yaml
- templates/api/docs/paths/galleries/entity.yaml
- templates/api/docs/paths/galleries/files/entity.yaml
- templates/api/docs/paths/galleries/files/index.yaml
- templates/api/docs/paths/galleries/files/update.yaml
- templates/api/docs/paths/galleries/index.yaml
- templates/api/docs/paths/galleries/upload.yaml
- templates/api/docs/paths/groups/add_users.yaml
- templates/api/docs/paths/groups/ban_users.yaml
- templates/api/docs/paths/groups/delete.yaml
- templates/api/docs/paths/groups/entity.yaml
- templates/api/docs/paths/groups/index.yaml
- templates/api/docs/paths/search/lookup.yaml
- templates/api/docs/paths/search/process_queue.yaml
- templates/api/docs/paths/search/rebuild.yaml
- templates/api/docs/paths/tabulars/entity.yaml
- templates/api/docs/paths/tabulars/index.yaml
- templates/api/docs/paths/trackers/duplicate.yaml
- templates/api/docs/paths/trackers/entity.yaml
- templates/api/docs/paths/trackers/fields/entity.yaml
- templates/api/docs/paths/trackers/fields/export.yaml
- templates/api/docs/paths/trackers/fields/index.yaml
- templates/api/docs/paths/trackers/index.yaml
- templates/api/docs/paths/trackers/items/entity.yaml
- templates/api/docs/paths/trackers/items/history.yaml
- templates/api/docs/paths/trackers/items/index.yaml
- templates/api/docs/paths/trackers/items/status.yaml
- templates/api/docs/paths/translations/attach.yaml
- templates/api/docs/paths/translations/detach.yaml
- templates/api/docs/paths/translations/index.yaml
- templates/api/docs/paths/users/delete.yaml
- templates/api/docs/paths/users/entity.yaml
- templates/api/docs/paths/users/groups.yaml
- templates/api/docs/paths/users/index.yaml
- templates/api/docs/paths/wiki/delete.yaml
- templates/api/docs/paths/wiki/entity.yaml
- templates/api/docs/paths/wiki/index.yaml
- templates/api/docs/paths/wiki/lock.yaml
- templates/api/docs/paths/wiki/unlock.yaml
- + templates/api/docs/schemas/CategorizeResponse.yaml
- templates/api/docs/schemas/Category.yaml
- templates/api/docs/schemas/Comment.yaml
- + templates/api/docs/schemas/CommentListEntry.yaml
- + templates/api/docs/schemas/CommentListResponse.yaml
- + templates/api/docs/schemas/DeleteCommentResponse.yaml
- + templates/api/docs/schemas/DeleteFileGalleryResponse.yaml
- + templates/api/docs/schemas/DeleteUserFeedbackResponse.yaml
- templates/api/docs/schemas/File.yaml
- + templates/api/docs/schemas/FileInfoResponse.yaml
- + templates/api/docs/schemas/FileListResponse.yaml
- + templates/api/docs/schemas/FileUploadResponse.yaml
- templates/api/docs/schemas/Gallery.yaml
- + templates/api/docs/schemas/GalleryInfoResponse.yaml
- + templates/api/docs/schemas/GalleryListResponse.yaml
- + templates/api/docs/schemas/GroupActionFeedbackResponse.yaml
- + templates/api/docs/schemas/GroupActionResponse.yaml
- + templates/api/docs/schemas/GroupListEntry.yaml
- + templates/api/docs/schemas/GroupListResponse.yaml
- + templates/api/docs/schemas/GroupUserActionFeedbackResponse.yaml
- + templates/api/docs/schemas/LockCommentResponse.yaml
- + templates/api/docs/schemas/LockFileResponse.yaml
- + templates/api/docs/schemas/ManageGroupsFeedbackResponse.yaml
- + templates/api/docs/schemas/MessageCountResponse.yaml
- + templates/api/docs/schemas/ModerateCommentResponse.yaml
- + templates/api/docs/schemas/RefreshFeedbackResponse.yaml
- + templates/api/docs/schemas/RegisterUserResponse.yaml
- + templates/api/docs/schemas/SearchLookupNoResultsResponse.yaml
- + templates/api/docs/schemas/SearchLookupResponse.yaml
- + templates/api/docs/schemas/SearchProcessQueueResponse.yaml
- + templates/api/docs/schemas/SearchRebuildResponse.yaml
- + templates/api/docs/schemas/SimpleCommentResponse.yaml
- + templates/api/docs/schemas/TabularListResponse.yaml
- + templates/api/docs/schemas/TabularResponse.yaml
- + templates/api/docs/schemas/TrackerCreateUpdateResponse.yaml
- + templates/api/docs/schemas/TrackerField.yaml
- templates/api/docs/schemas/TrackerItem.yaml
- + templates/api/docs/schemas/TranslationsForwardResponse.yaml
- + templates/api/docs/schemas/TranslationsManageResponse.yaml
- + templates/api/docs/schemas/TranslationsManageWithTranslationsResponse.yaml
- + templates/api/docs/schemas/UnlockFileResponse.yaml
- + templates/api/docs/schemas/UpdateCommentResponse.yaml
- + templates/api/docs/schemas/UserInfoResponse.yaml
- + templates/api/docs/schemas/UserListEntry.yaml
- + templates/api/docs/schemas/UserListResponse.yaml
- + templates/api/docs/schemas/WikiCreateUpdatePageResponse.yaml
- + templates/api/docs/schemas/WikiPageInfoEntry.yaml
- + templates/api/docs/schemas/WikiPageListEntry.yaml
- + templates/api/docs/schemas/WikiPageListResponse.yaml
- templates/api/docs/schemas/WikiPageResponse.yaml
- + templates/api/docs/schemas/WikiPatchPageResponse.yaml


The diff was not included because it is too large.


View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ebdb7cbf23412a53e5011b072ad16f21ace6849d

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ebdb7cbf23412a53e5011b072ad16f21ace6849d
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.