[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28283: Status: [PATCH 1/1] gnu: services: version-control: Add cgit.
From: |
Ludovic Courtès |
Subject: |
bug#28283: Status: [PATCH 1/1] gnu: services: version-control: Add cgit. |
Date: |
Tue, 03 Oct 2017 15:07:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Oleg Pykhalov <address@hidden> skribis:
> From 984b619620046015113cc4876569f5c87dd37c79 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <address@hidden>
> Date: Thu, 28 Sep 2017 20:02:35 +0300
> Subject: [PATCH] gnu: services: version-control: Add cgit.
>
> * gnu/services/version-control.scm
> (<cgit-configuration-file>, <cgit-configuration>): New record types.
> (cgit-configuration-robots-string, cgit-activation,
> cgit-configuration-nginx-config): New procedures.
> (%cgit-configuration-nginx, cgit-service-type): New variables.
> * doc/guix.texi (Version Control): Document the cgit service.
> ---
> doc/guix.texi | 65 ++++++++++++++++
> gnu/local.mk | 1 +
> gnu/services/version-control.scm | 119 ++++++++++++++++++++++++++++-
> gnu/tests/version-control.scm | 161
> +++++++++++++++++++++++++++++++++++++++
> 4 files changed, 345 insertions(+), 1 deletion(-)
> create mode 100644 gnu/tests/version-control.scm
Awesome!
I took the liberty to add more URL tests:
--8<---------------cut here---------------start------------->8---
;; Make sure we can access pages that correspond to our repository.
(letrec-syntax ((test-url
(syntax-rules ()
((_ path code)
(test-equal (string-append "GET " path)
code
(let-values (((response body)
(http-get (string-append
"http://localhost:8080"
path))))
(response-code response))))
((_ path)
(test-url path 200)))))
(test-url "/")
(test-url "/test")
(test-url "/test/log")
(test-url "/test/tree")
(test-url "/test/does-not-exist" 404)
(test-url "/does-not-exist" 404))
--8<---------------cut here---------------end--------------->8---
Will push in a minute. Thank you!
Ludo’.