Subject: [bug#74769] [PATCH Cuirass 3/4] tests: Explicit Gitlab endpoint related variables.

From: Romain GARBAGE <[email-masked]>
Date: Tue, 10 Dec 2024 17:09:27 +0100

* tests/http.scm: Rename mr-* variables to gitlab-merge-request-*.
---
 tests/http.scm | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/tests/http.scm b/tests/http.scm
index 7b8ab03..9712787 100644
--- a/tests/http.scm
+++ b/tests/http.scm
@@ -90,7 +90,7 @@
                      (channel . "packages")
                      (directory . "dir2")))))))
 
-(define mr-json-open
+(define gitlab-merge-request-json-open
   "{
     \"event_type\": \"merge_request\",
     \"project\": {
@@ -108,7 +108,7 @@
     }
   }")
 
-(define mr-json-close
+(define gitlab-merge-request-json-close
   "{
     \"event_type\": \"merge_request\",
     \"project\": {
@@ -126,8 +126,8 @@
     }
   }")
 
-(define mr-spec
-  (let ((event (json->gitlab-event mr-json-open)))
+(define gitlab-merge-request-spec
+  (let ((event (json->gitlab-event gitlab-merge-request-json-open)))
     (gitlab-merge-request->specification
      (gitlab-event-value event)
      (gitlab-event-project event))))
@@ -438,24 +438,24 @@
                          (specification-channels spec)))))))
 
    (test-equal "/admin/gitlab/event creates a spec from a new merge request"
-     (specification-name mr-spec)
+     (specification-name gitlab-merge-request-spec)
      (begin
-       (http-post-json (test-cuirass-uri "/admin/gitlab/event") mr-json-open)
-       (specification-name (db-get-specification (specification-name mr-spec)))))
+       (http-post-json (test-cuirass-uri "/admin/gitlab/event") gitlab-merge-request-json-open)
+       (specification-name (db-get-specification (specification-name gitlab-merge-request-spec)))))
 
    (test-equal "/admin/gitlab/event error when a merge request has already been created"
      400
-     (response-code (http-post-json (test-cuirass-uri "/admin/gitlab/event") mr-json-open)))
+     (response-code (http-post-json (test-cuirass-uri "/admin/gitlab/event") gitlab-merge-request-json-open)))
 
    (test-assert "/admin/gitlab/event removes a spec from a closed merge request"
      (begin
-       (http-post-json (test-cuirass-uri "/admin/gitlab/event") mr-json-close)
-       (not (db-get-specification (specification-name mr-spec)))))
+       (http-post-json (test-cuirass-uri "/admin/gitlab/event") gitlab-merge-request-json-close)
+       (not (db-get-specification (specification-name gitlab-merge-request-spec)))))
 
    (test-equal "/admin/gitlab/event error when a merge request has already been closed"
      404
      (response-code (http-post-json (test-cuirass-uri "/admin/gitlab/event")
-                                    mr-json-close)))
+                                    gitlab-merge-request-json-close)))
 
    (test-assert "db-close"
      (begin
-- 
2.46.0