Skip to content

Move edition tests to model where they belong

Doug Stull requested to merge move-edition-tests into master

What does this MR do?

Moves edition tests to license model where they now belong. Reduces db activity by using build instead of create

Factory Doctor output

16:04 $ FDOC=1 be rspec ee/spec/lib/gitlab/usage_data_spec.rb
[TEST PROF INFO] FactoryDoctor enabled (event: "sql.active_record", threshold: 0.01)
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

==> Setting up Gitaly...
Checking gitaly-ruby Gemfile...
Checking gitaly-ruby bundle...
The Gemfile's dependencies are satisfied
Trying to connect to gitaly: ....... OK
    Gitaly set up in 1.158653 seconds...

==> Setting up GitLab Workhorse...
    GitLab Workhorse set up in 0.000922 seconds...

==> Setting up GitLab Elasticsearch Indexer...
    GitLab Elasticsearch Indexer set up in 0.000508 seconds...
................[TEST PROF INFO] FactoryDoctor report

Total (potentially) bad examples: 1
Total wasted time: 00:00.017

Gitlab::UsageData (./ee/spec/lib/gitlab/usage_data_spec.rb:5) (4 records created, 00:00.017)
  have expected values (./ee/spec/lib/gitlab/usage_data_spec.rb:154) – 4 records created, 00:00.017

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

Merge request reports