summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-11-10 01:28:52 +0100
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-11-10 01:28:52 +0100
commit801d0faf457799e9772b5b97e821968f522778be (patch)
treecf166253074d8e62cd2be7e2e124b253a62ff41f
parent14342ac87a26e3593b00dcb8482a280544b1667e (diff)
downloadmonitoring-plugins-801d0faf457799e9772b5b97e821968f522778be.tar.gz
test_check_swap: improvements and updates to unit test code
-rw-r--r--plugins/tests/test_check_swap.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/tests/test_check_swap.c b/plugins/tests/test_check_swap.c
index 319cadbf..d657c13a 100644
--- a/plugins/tests/test_check_swap.c
+++ b/plugins/tests/test_check_swap.c
@@ -2,17 +2,15 @@
2#include "../check_swap.d/check_swap.h" 2#include "../check_swap.d/check_swap.h"
3#include "../../tap/tap.h" 3#include "../../tap/tap.h"
4 4
5void print_usage() {}; 5void print_usage(void) {}
6void print_help(swap_config config) { 6void print_help(swap_config config) {
7 (void) config; 7 (void) config;
8}; 8}
9 9
10const char *progname = "test_check_swap"; 10const char *progname = "test_check_swap";
11 11
12int main() { 12int main(void) {
13 swap_config config = swap_config_init(); 13 swap_result test_data = getSwapFromProcMeminfo("./var/proc_meminfo");
14
15 swap_result test_data = getSwapFromProcMeminfo(config, "./var/proc_meminfo");
16 14
17 plan_tests(4); 15 plan_tests(4);
18 16