Skip to content

Assert destroyed pipeline in Projects::DestroyService spec

drew stachon requested to merge assert-destroyed-pipeline into master

What does this MR do and why?

This change adds an assertion that project-related Ci::Pipeline records are removed when the Projects::DestroyService is executed.

I was tracing through several CI-related destruction callbacks as part of https://gitlab.com/gitlab-org/gitlab/-/issues/24644 and #340256 (closed) attempting to verify that we do in fact destroy Ci::Pipeline records when we destroy projects. It's not currently asserted along with the destruction of CI records in the execution spec, so I'm adding it here.

There is no behavioral change here, I'm just adding an assertion to more fully specify existing behavior.

How to set up and validate locally

  1. git fetch upstream assert-destroyed-pipeline
  2. git checkout upstream/assert-destroyed-pipeline
  3. bundle exec rspec spec/services/projects/destroy_service_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports