From 58aaf20b7b76a0e89ba2dded97934793dcdf48d1 Mon Sep 17 00:00:00 2001
From: iamashwin99 <ashwin-kumar.karnad@mpsd.mpg.de>
Date: Mon, 21 Aug 2023 10:52:25 +0200
Subject: [PATCH] test explicitly that BUILD_ALL_remove.log is present

---
 tests/test_mpsd_software.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/test_mpsd_software.py b/tests/test_mpsd_software.py
index 96bb22d..31ecf26 100644
--- a/tests/test_mpsd_software.py
+++ b/tests/test_mpsd_software.py
@@ -690,7 +690,10 @@ def test_remove_environment(tmp_path, mocker):
     # check that the release directory is empty
     assert len(list(release_dir.iterdir())) == 0
     # check that the logs directory is non-empty
-    assert len(list(logs_dir.iterdir())) == 2  # APEX + remove_build_log
+    list_of_logs = list(logs_dir.iterdir())
+    assert len(list_of_logs) == 2  # APEX + remove_build_log
+    # check that one of the log has 'remove.log' as part of the name
+    assert "BUILD_ALL_remove.log" in ",".join([str(x) for x in list_of_logs])
 
     # Test case3  - remove specific package_sets
     # defined in test_remove_package_sets
-- 
GitLab