Skip to content

No license by default in specs

Thong Kuah requested to merge no_license_in_specs_by_default into master

What does this MR do and why?

By default, licensed features are disabled while specs are running

-- https://docs.gitlab.com/ee/development/ee_features.html#testing-ee-only-backend-features

However, I found that we actually do initialize specs with a Starter license in EE (see #386401 (closed)). This is a problem because this means that we may miss testing the instance "acting as CE when unlicensed", especially for specs in spec/.

So I propose the following:

  • ee/spec defaults with a starter license. This is achieved with the with_license tag by default
  • spec/ functions as FOSS when no ee/ directory. This is achieved by deleting ee/ (not loading ee/spec/spec_helper)
  • spec/ functions as EE without license with an ee/ dir. This is achieved with the without_license tag by default

There are ~27 files in spec/ that seems to require a license - I will open followup issues to investigate these files. These files may be hiding a bug, or just have a test gap where they are not testing EE without license should behave like CE.

Related issue: #386401 (closed)

Screenshots or screen recordings

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

How to set up and validate locally

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

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 Thong Kuah

Merge request reports