Skip to content

Use build instead of create for Factory objects

What does this MR do?

Following our test speed guidelines, this MR replaces Factory#create with Factory.build in analytics tests, to shave off some time from spec runtime.

create is only needed when objects need to be persisted. Using build saves test runtime when it is enough to have the object in memory.

Screenshots

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 Aakriti Gupta

Merge request reports