Skip to content

Fix the package.json content in the QA specs

🥗 Context

In !73639 (merged), we added support for the NPM metadata structure behind a feature flag.

That structure is sent by $ npm during the upload. The content of that structure is basically the package.json file content.

For added safety, in !73639 (merged), a json validation was put in place against the structure content.

Unfortunately, the QA specs for NPM were using an invalid package.json content and this led to a QA smoke test failure.

This MR fixes those specs.

🔍 What does this MR do and why?

  • Update the QA specs for NPM so that they're using a valid package.json content.
    • we have two specs: the project and the instance level

🖼 Screenshots or screen recordings

n / a

How to set up and validate locally

  1. Follow https://about.gitlab.com/handbook/engineering/development/ops/package/quality/#how-to-run-them-locally
  2. Run the npm instance level scenario:
    $ WEBDRIVER_HEADLESS=false bundle exec bin/qa Test::Instance::All http://172.16.123.1:8000 -- qa/specs/features/browser_ui/5_package/package_registry/npm/npm_instance_level_spec.rb --tag orchestrated --tag packages
  3. Run the npm project level scenario:
    $ WEBDRIVER_HEADLESS=false bundle exec bin/qa Test::Instance::All http://172.16.123.1:8000 -- qa/specs/features/browser_ui/5_package/package_registry/npm/npm_project_level_spec.rb --tag orchestrated --tag packages

🛃 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 David Fernandez

Merge request reports