Skip to content

Fix Release API spec for testing the direct_asset_path

Pam Artiaga requested to merge pam/fix-releaseapi-spec-directassetpath into master

What does this MR do and why?

The Release API -> Create release endpoint accepts direct_asset_path as a nested parameter under params[:assets][:links] and converts it to filepath (see https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/api/releases.rb#L241).

This direct_asset_path to filepath conversion is supposed to be tested in the specs, however, the test setup is incorrect.

This MR fixes the test setup, making sure that direct_asset_path is a nested parameter under params[:assets][:links].

Additionally, this fix blocks !121705 (merged), which introduces some changes in how direct_asset_path and filepath are handled.

Related Issue: #395809 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

N/A

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

N/A

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Pam Artiaga

Merge request reports