From: Romain GARBAGE <romain.garbage@inria.fr>
To: 74769@debbugs.gnu.org
Cc: ludovic.courtes@inria.fr, Romain GARBAGE <romain.garbage@inria.fr>
Subject: [bug#74769] [PATCH Cuirass v2 6/7] tests: Explicit Gitlab endpoint related variables.
Date: Thu, 12 Dec 2024 16:57:54 +0100 [thread overview]
Message-ID: <20241212155845.27344-6-romain.garbage@inria.fr> (raw)
In-Reply-To: <20241212155845.27344-1-romain.garbage@inria.fr>
* 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 541f30d..aa58e78 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
next prev parent reply other threads:[~2024-12-12 16:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 16:01 [bug#74769] [PATCH Cuirass 0/4] Forgejo event support Romain GARBAGE
2024-12-10 16:09 ` [bug#74769] [PATCH Cuirass 1/4] tests: Move procedure definition Romain GARBAGE
2024-12-10 16:09 ` [bug#74769] [PATCH Cuirass 2/4] forgejo: Add module for Forgejo JSON objects definition Romain GARBAGE
2024-12-12 13:34 ` Ludovic Courtès
2024-12-10 16:09 ` [bug#74769] [PATCH Cuirass 3/4] tests: Explicit Gitlab endpoint related variables Romain GARBAGE
2024-12-10 16:09 ` [bug#74769] [PATCH Cuirass 4/4] http: Add admin/forgejo/event Romain GARBAGE
2024-12-12 15:57 ` [bug#74769] [PATCH Cuirass v2 1/7] tests: Move procedure definition Romain GARBAGE
2024-12-12 15:57 ` [bug#74769] [PATCH Cuirass v2 2/7] tests: Rename specifications-equal? procedure Romain GARBAGE
2024-12-12 15:57 ` [bug#74769] [PATCH Cuirass v2 3/7] forges: Add module for common forges utilities Romain GARBAGE
2024-12-12 15:57 ` [bug#74769] [PATCH Cuirass v2 4/7] forges: Define default values for specifications Romain GARBAGE
2024-12-12 15:57 ` [bug#74769] [PATCH Cuirass v2 5/7] forgejo: Add module for Forgejo JSON objects definition Romain GARBAGE
2024-12-12 15:57 ` Romain GARBAGE [this message]
2024-12-12 15:57 ` [bug#74769] [PATCH Cuirass v2 7/7] http: Add admin/forgejo/event Romain GARBAGE
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241212155845.27344-6-romain.garbage@inria.fr \
--to=romain.garbage@inria.fr \
--cc=74769@debbugs.gnu.org \
--cc=ludovic.courtes@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).