[med-svn] [Git][med-team/orthanc][master] 6 commits: Created tests/control
Israel Komolehin (@Komolehin)
gitlab at salsa.debian.org
Mon Oct 16 16:10:39 BST 2023
Israel Komolehin pushed to branch master at Debian Med / orthanc
Commits:
4f8dd6f5 by Komolehin Israel Timilehin at 2023-10-15T09:28:39+00:00
Created tests/control
- - - - -
da68bb4c by Komolehin Israel Timilehin at 2023-10-15T14:36:05+00:00
Created autopkgtest test script
- - - - -
dd924864 by Komolehin Israel Timilehin at 2023-10-15T18:02:20+00:00
Updated changelog
- - - - -
9f5017f0 by Komolehin Israel Timilehin at 2023-10-15T19:41:00+00:00
Updated debian/tests/control restriction
- - - - -
eb56f27f by Komolehin Israel Timilehin at 2023-10-15T19:41:42+00:00
Removed sudo occurrences
- - - - -
4d071c75 by Komolehin Israel Timilehin at 2023-10-16T08:43:57+00:00
Updated tests/control
- - - - -
3 changed files:
- debian/changelog
- + debian/tests/control
- + debian/tests/run-test
Changes:
=====================================
debian/changelog
=====================================
@@ -1,7 +1,12 @@
orthanc (1.12.1+dfsg-3) unstable; urgency=medium
+ [ Sebastien Jodogne ]
* Fix compatibility with big-endian architectures. (Closes: #1041813)
+ [ Komolehin Israel Timilehin ]
+ * Created debian/tests/control
+ * Added autopkgtest test
+
-- Sebastien Jodogne <s.jodogne at gmail.com> Wed, 16 Aug 2023 09:07:21 +0200
orthanc (1.12.1+dfsg-2) unstable; urgency=high
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-test
+Depends: curl, orthanc
+Restrictions: needs-root
=====================================
debian/tests/run-test
=====================================
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+set -e
+
+
+pkg=orthanc
+service_name=$pkg
+
+if [ "$AUTOPKGTEST_TMP" = "" ]; then
+ # create the tmp directory
+ AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXX`
+
+ # clean the directory if any of these signal is detected
+ trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd $AUTOPKGTEST_TMP
+
+
+# Check if user 'orthanc' exists
+if getent passwd orthanc > /dev/null 2>&1; then
+ echo "User 'orthanc' exists."
+else
+ adduser --system --group orthanc
+ echo "User 'orthanc' added."
+fi
+
+
+/etc/init.d/$service_name start
+
+if [ $? -eq 0 ]; then
+ echo "Orthanc is active."
+else
+ echo "Orthanc is not active."
+fi
+
+URL="http://localhost:8042/app/explorer.html"
+
+status_code=$(curl -s -o /dev/null -w "%{http_code}" "$URL")
+
+# Check the status code
+if [ "$status_code" -eq 200 ]; then
+ echo "Request successful (HTTP status code 200)"
+ exit 0
+else
+ echo "Request failed with HTTP status code $status_code"
+ exit 1
+fi
+
+
+
+
+
+
View it on GitLab: https://salsa.debian.org/med-team/orthanc/-/compare/6f7521aa614bd539598959ba97a148fe6512997b...4d071c75179b4ac1deff16cfe01a4ae782beb68c
--
View it on GitLab: https://salsa.debian.org/med-team/orthanc/-/compare/6f7521aa614bd539598959ba97a148fe6512997b...4d071c75179b4ac1deff16cfe01a4ae782beb68c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231016/67e7d2f8/attachment-0001.htm>
More information about the debian-med-commit
mailing list