Skip to content

Fix nightly failures - Clean up tests

Patrick Rice requested to merge fix-some-nightly-failures into main
  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

The code changes involve several test cases for different resources in a GitLab project. The resources include protected branches, pipeline schedules, Slack integrations, pipeline schedule variables, pipeline triggers, and more. The tests ensure that these resources are created, updated, and deleted as expected, and that their attributes are set correctly. The changes also include improvements to error handling and resource cleanup. Overall, these changes enhance the reliability and usability of the GitLab provider for Terraform.

Changes include:

  • Removing gitlab_project references from tests where the project resource isn't under test (cleaning up legacy testing approach and replacing it with testutil)
  • Fixing the slack destroy check. The slack service return active = false with no error when it's been destroyed, not an error. The only reason the approach worked before is that attempting to retrieve a slack integration on a destroyed project errored, and the project being in TF meant the project was destroyed before the slack service was tested. This now tests that the slack service is destroyed instead of the whole project.
  • Fixing more instances of reference mis-matches in pipeline schedules.
Edited by 🤖 GitLab Bot 🤖

Merge request reports