Prevent deploy token factory from creating invalid records

What does this MR do and why?

The deploy_tokens table recently had project_id and group_id columns added that will be used for the sharding key. This merge request updates the factory to set these fields by default, as they are currently left empty which is not valid.

With the factory now creating an associated project or group if one isn't specified, some tests needed updating to avoid creating associations twice.

Only spec/factory changes, no change in behaviour.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

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

Before After

How to set up and validate locally

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

Related to #477395 (closed)

Edited by Tiger Watson

Merge request reports

Loading