View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032804 | mantisbt | api rest | public | 2023-08-06 06:17 | 2023-10-31 16:32 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 2.26.0 | Fixed in Version | 2.26.0 | ||
Summary | 0032804: REST API unit test incorrectly failing with anonymous user | ||||
Description | When running RestProjectVersionTests.php, testProjectDeleteVersionAnonymous passes when $g_allow_anonymous_login = ON, but fails with a properly setup anonymous account:
With a valid anonymous account setup, the API returns When anonymous login is disabled or not valid, the API returns | ||||
Tags | No tags attached. | ||||
Additional issues found |
|
MantisBT: master dc3361c7 2023-08-06 05:39 Details Diff |
Tests: Fix testProjectDeleteVersionAnonymous - Incorrect assertion: when updating a version as anonymous user, the API returns 403, not 401. The latter occurs when anonymous account is not valid. - Skip the test when anonymous login is disabled Add assertion messages. Fixes 0032804 |
Affected Issues 0032804 |
|
mod - tests/rest/RestProjectVersionTests.php | Diff File | ||
MantisBT: master 5ba470b2 2023-08-06 09:42 Details Diff |
Travis: avoid skipped anonymous user test cases Adapt travis_before_script.sh to - create an anonymous user account - reference it in the generated config_inc.php file This ensures that testProjectDeleteVersionAnonymous is not skipped. Issue 0032804 |
Affected Issues 0032804 |
|
mod - build/travis_before_script.sh | Diff File | ||
MantisBT: master cae3e669 2023-08-06 10:46 Details Diff |
Fixing RestUserTest for anonymous user - Incorrect assertions: when executing tests as anonymous user, the API does not return 401; this occurs when anonymous account is not valid. Actual return value is - testGetUserByIdZeroAnonymous: 400 - testGetUserByIdNotFoundAnonymous: 404 - Skip the test when anonymous login is disabled. The following cases were adapted: - testCreateUserAnonymous - testUpdateUserAnonymous - testGetUserByIdAnonymous - testGetUserByIdNotFoundAnonymous - testGetUserByIdZeroAnonymous - testDeleteUserByIdAnonymous Fixes 0032804 |
Affected Issues 0032804 |
|
mod - tests/rest/RestUserTest.php | Diff File | ||
MantisBT: master 5883a12d 2023-08-06 19:14 Details Diff |
Travis: generate cookie string with bash commands Avoid use of MySQL specific functions causing PostgreSQL builds to fail. |
Affected Issues 0032804 |
|
mod - build/travis_before_script.sh | Diff File | ||
MantisBT: master b75d6bd7 2023-08-06 19:30 Details Diff |
Quote bool value to fix type error on PostgreSQL |
Affected Issues 0032804 |
|
mod - build/travis_before_script.sh | Diff File |