Skip deleted files when checking for e2e only spec files

What does this MR do and why?

Fixes https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/1150

With this MR, if an MR changes only e2e tests, we were running only those e2e tests by setting those tests to QA_TESTS env variable.

But if the test file is deleted, it should not be added to QA_TESTS. This MR fixes that issue.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

  1. MR only changes e2e tests: PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE="super-secret-token" CI_API_V4_URL="https://www.gitlab.com//api/v4" CI_MERGE_REQUEST_PROJECT_PATH="gitlab-org/gitlab" CI_MERGE_REQUEST_IID="78034" tooling/bin/find_changes ~/temp/qa_changed_files.txt
  2. MR deletes e2e test file: PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE="super-secret-token" CI_API_V4_URL="https://www.gitlab.com//api/v4" CI_MERGE_REQUEST_PROJECT_PATH="gitlab-org/gitlab" CI_MERGE_REQUEST_IID="77945" tooling/bin/find_changes ~/temp/qa_changed_files.txt
  3. MR changes e2e specs and other files: PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE="super-secret-token" CI_API_V4_URL="https://www.gitlab.com//api/v4" CI_MERGE_REQUEST_PROJECT_PATH="gitlab-org/gitlab" CI_MERGE_REQUEST_IID="77666" tooling/bin/find_changes ~/temp/qa_changed_files.txt

MR acceptance checklist

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

Edited by Rémy Coutable

Merge request reports

Loading