Skip to content

Fix hardcoded ids in projects API tests

Adam Hegyi requested to merge fix-hardcoded-ids-in-projects-spec into master

What does this MR do?

This MR fixes the hardcoded ids in projects API tests and fixes random test failures.

Example pipeline error:

1) API::Projects GET /projects/:id when authenticated as a regular user returns a 404 error if not found
     Failure/Error: expect(response).to have_gitlab_http_status(:not_found)
       expected the response to have status code :not_found but it was 200. The response was: {"id":42,"description":null,"name":"second_project","name_with_namespace":"John Doe171 / second_project","path":"second_project","path_with_namespace":"user219/second_project","created_at":"2021-02-01T13:17:43.310Z","default_bran

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Alex Kalderimis

Merge request reports

Loading