diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-11-10 01:28:52 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-11-10 01:28:52 +0100 |
commit | 801d0faf457799e9772b5b97e821968f522778be (patch) | |
tree | cf166253074d8e62cd2be7e2e124b253a62ff41f | |
parent | 14342ac87a26e3593b00dcb8482a280544b1667e (diff) | |
download | monitoring-plugins-801d0faf457799e9772b5b97e821968f522778be.tar.gz |
test_check_swap: improvements and updates to unit test code
-rw-r--r-- | plugins/tests/test_check_swap.c | 10 |
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 | ||
5 | void print_usage() {}; | 5 | void print_usage(void) {} |
6 | void print_help(swap_config config) { | 6 | void print_help(swap_config config) { |
7 | (void) config; | 7 | (void) config; |
8 | }; | 8 | } |
9 | 9 | ||
10 | const char *progname = "test_check_swap"; | 10 | const char *progname = "test_check_swap"; |
11 | 11 | ||
12 | int main() { | 12 | int 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 | ||