[pkg-nagios-changes] [Git][nagios-team/centreon-plugins][debian/master] 3 commits: Add superficial autopkgtest validating one uptime check using snmp

Baptiste Beauplat (@lyknode) gitlab at salsa.debian.org
Thu Nov 11 18:10:26 GMT 2021



Baptiste Beauplat pushed to branch debian/master at Debian Nagios Maintainer Group / centreon-plugins


Commits:
a55c38f8 by Baptiste Beauplat at 2021-11-09T21:19:40+01:00
Add superficial autopkgtest validating one uptime check using snmp

- - - - -
fdcc8356 by Baptiste Beauplat at 2021-11-11T19:04:55+01:00
Fix executable bit on a perl module

- - - - -
d0df585b by Baptiste Beauplat at 2021-11-11T19:05:37+01:00
Update changelog for 0.0~20211102-1 release

- - - - -


6 changed files:

- debian/changelog
- debian/rules
- + debian/tests/0001-linux-snmp.sh
- + debian/tests/control
- + debian/tests/snmpd.conf
- + debian/tests/testing-lib


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+centreon-plugins (0.0~20211102-1) unstable; urgency=medium
+
+  [ Baptiste Beauplat ]
+  * New upstream version 0.0~20211102
+  * Add superficial autopkgtest validating one uptime check using snmp
+  * Fix executable bit on a perl module
+
+  [ Bas Couwenberg ]
+  * Rename salsa-ci.yml to .gitlab-ci.yml.
+
+ -- Baptiste Beauplat <lyknode at debian.org>  Thu, 11 Nov 2021 19:05:25 +0100
+
 centreon-plugins (0.0~20210520-1) unstable; urgency=medium
 
   * Initial release (Closes: #993963)


=====================================
debian/rules
=====================================
@@ -5,3 +5,6 @@
 
 override_dh_auto_build:
 	make -C doc/en html
+
+execute_after_dh_fixperms:
+	chmod -x debian/centreon-plugins/usr/lib/centreon-plugins/hardware/server/hp/proliant/snmp/mode/components/memory.pm


=====================================
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/6ced9f7aaeb8d8640a08cc631a00adce2d88123f...d0df585b45d273433b9669fb65403413794e17bd

-- 
View it on GitLab: https://salsa.debian.org/nagios-team/centreon-plugins/-/compare/6ced9f7aaeb8d8640a08cc631a00adce2d88123f...d0df585b45d273433b9669fb65403413794e17bd
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/20211111/035a09eb/attachment-0001.htm>


More information about the pkg-nagios-changes mailing list