[pkg-nagios-changes] [Git][nagios-team/centreon-plugins][test-autopkgtest] 3 commits: Rename salsa-ci.yml to .gitlab-ci.yml.
Baptiste Beauplat (@lyknode)
gitlab at salsa.debian.org
Tue Nov 9 20:20:01 GMT 2021
Baptiste Beauplat pushed to branch test-autopkgtest at Debian Nagios Maintainer Group / centreon-plugins
Commits:
6ced9f7a by Bas Couwenberg at 2021-11-09T21:09:50+01:00
Rename salsa-ci.yml to .gitlab-ci.yml.
- - - - -
a55c38f8 by Baptiste Beauplat at 2021-11-09T21:19:40+01:00
Add superficial autopkgtest validating one uptime check using snmp
- - - - -
617b0248 by Baptiste Beauplat at 2021-11-09T21:19:40+01:00
Update changelog for 0.0~20211102-1 release
- - - - -
6 changed files:
- debian/salsa-ci.yml → debian/.gitlab-ci.yml
- debian/changelog
- + debian/tests/0001-linux-snmp.sh
- + debian/tests/control
- + debian/tests/snmpd.conf
- + debian/tests/testing-lib
Changes:
=====================================
debian/salsa-ci.yml → debian/.gitlab-ci.yml
=====================================
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+centreon-plugins (0.0~20211102-1) UNRELEASED; urgency=medium
+
+ * New upstream version 0.0~20211102
+ * Add superficial autopkgtest validating one uptime check using snmp
+
+ -- Baptiste Beauplat <lyknode at debian.org> Tue, 09 Nov 2021 20:46:26 +0100
+
centreon-plugins (0.0~20210520-1) unstable; urgency=medium
* Initial release (Closes: #993963)
=====================================
debian/tests/0001-linux-snmp.sh
=====================================
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+. ./debian/tests/testing-lib
+
+start_snmpd
+/usr/lib/nagios/plugins/centreon_plugins.pl \
+ --plugin os::linux::snmp::plugin \
+ --mode uptime \
+ --hostname 127.0.0.1 \
+ --snmp-port "${SNMP_PORT}" \
+ --snmp-version 2 \
+ --verbose
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,5 @@
+Tests: 0001-linux-snmp.sh
+Depends: @,
+ libsnmp-perl,
+ snmpd
+Restrictions: superficial
=====================================
debian/tests/snmpd.conf
=====================================
@@ -0,0 +1,3 @@
+agentaddress 127.0.0.1:@SNMP_PORT@
+view systemonly included .1.3.6.1.2.1.1
+rocommunity public default -V systemonly
=====================================
debian/tests/testing-lib
=====================================
@@ -0,0 +1,25 @@
+start_snmpd() {
+ PID_FILE="$(mktemp)"
+ CONF_FILE="$(mktemp)"
+
+ get_random_port
+
+ sed -e "s/@SNMP_PORT@/${SNMP_PORT}/g" debian/tests/snmpd.conf > "${CONF_FILE}"
+ /usr/sbin/snmpd -C -c "${CONF_FILE}" -p "${PID_FILE}" -Ln
+
+ trap stop_snmpd EXIT
+}
+
+get_random_port() {
+ while true; do
+ SNMP_PORT="$(( RANDOM + 1024 + 1 ))"
+ grep -q "$(printf ":%.4X " "${SNMP_PORT}")" /proc/net/udp || break
+ done
+}
+
+stop_snmpd() {
+ kill -9 "$(cat "${PID_FILE}")"
+
+ rm "${PID_FILE}"
+ rm "${CONF_FILE}"
+}
View it on GitLab: https://salsa.debian.org/nagios-team/centreon-plugins/-/compare/5a63c3ec138b6ef4da7cc66d83105ef92110647d...617b0248434bf73b06f3ca79d031454462b2ebdd
--
View it on GitLab: https://salsa.debian.org/nagios-team/centreon-plugins/-/compare/5a63c3ec138b6ef4da7cc66d83105ef92110647d...617b0248434bf73b06f3ca79d031454462b2ebdd
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/pkg-nagios-changes/attachments/20211109/249391dd/attachment-0001.htm>
More information about the pkg-nagios-changes
mailing list