aboutsummaryrefslogtreecommitdiff
path: root/pkg/zabbix
diff options
context:
space:
mode:
authorJulien Dessaux2021-04-23 16:51:22 +0200
committerJulien Dessaux2021-04-23 16:51:22 +0200
commit38d9c881b3b5ece91f428c87f0b7bb9efb3e88a8 (patch)
treed3f7167fae6388f4db35a63e660d1816c9c2943e /pkg/zabbix
parentFixed wrongfully hardcoded path in tests. (diff)
downloadbareos-zabbix-check-38d9c881b3b5ece91f428c87f0b7bb9efb3e88a8.tar.gz
bareos-zabbix-check-38d9c881b3b5ece91f428c87f0b7bb9efb3e88a8.tar.bz2
bareos-zabbix-check-38d9c881b3b5ece91f428c87f0b7bb9efb3e88a8.zip
Updated for go 1.16 modules1.2
Diffstat (limited to '')
-rw-r--r--pkg/zabbix/flags.go (renamed from zabbix/flags.go)0
-rw-r--r--pkg/zabbix/statefile.go (renamed from zabbix/statefile.go)0
-rw-r--r--pkg/zabbix/testdata/bareos-fd-17.2.state (renamed from zabbix/testdata/bareos-fd-17.2.state)bin2196 -> 2196 bytes
-rw-r--r--pkg/zabbix/testdata/bareos-fd-18.2.state (renamed from zabbix/testdata/bareos-fd-18.2.state)bin2196 -> 2196 bytes
-rw-r--r--pkg/zabbix/testdata/bareos-fd-18.2.state-with-error (renamed from zabbix/testdata/bareos-fd-18.2.state-with-error)bin2196 -> 2196 bytes
-rw-r--r--pkg/zabbix/workdir.go (renamed from zabbix/workdir.go)0
-rw-r--r--pkg/zabbix/zabbix.go (renamed from zabbix/main.go)7
-rw-r--r--pkg/zabbix/zabbix_test.go (renamed from zabbix/main_test.go)4
8 files changed, 6 insertions, 5 deletions
diff --git a/zabbix/flags.go b/pkg/zabbix/flags.go
index 3e95321..3e95321 100644
--- a/zabbix/flags.go
+++ b/pkg/zabbix/flags.go
diff --git a/zabbix/statefile.go b/pkg/zabbix/statefile.go
index 26ea650..26ea650 100644
--- a/zabbix/statefile.go
+++ b/pkg/zabbix/statefile.go
diff --git a/zabbix/testdata/bareos-fd-17.2.state b/pkg/zabbix/testdata/bareos-fd-17.2.state
index e98786c..e98786c 100644
--- a/zabbix/testdata/bareos-fd-17.2.state
+++ b/pkg/zabbix/testdata/bareos-fd-17.2.state
Binary files differ
diff --git a/zabbix/testdata/bareos-fd-18.2.state b/pkg/zabbix/testdata/bareos-fd-18.2.state
index ca1f30c..ca1f30c 100644
--- a/zabbix/testdata/bareos-fd-18.2.state
+++ b/pkg/zabbix/testdata/bareos-fd-18.2.state
Binary files differ
diff --git a/zabbix/testdata/bareos-fd-18.2.state-with-error b/pkg/zabbix/testdata/bareos-fd-18.2.state-with-error
index 3d28356..3d28356 100644
--- a/zabbix/testdata/bareos-fd-18.2.state-with-error
+++ b/pkg/zabbix/testdata/bareos-fd-18.2.state-with-error
Binary files differ
diff --git a/zabbix/workdir.go b/pkg/zabbix/workdir.go
index 287c80a..287c80a 100644
--- a/zabbix/workdir.go
+++ b/pkg/zabbix/workdir.go
diff --git a/zabbix/main.go b/pkg/zabbix/zabbix.go
index 576fc17..77fef6d 100644
--- a/zabbix/main.go
+++ b/pkg/zabbix/zabbix.go
@@ -1,13 +1,14 @@
package zabbix
import (
- "bareos-zabbix-check/job"
- "bareos-zabbix-check/spool"
- "bareos-zabbix-check/state"
"fmt"
"os"
"path/filepath"
"time"
+
+ "git.adyxax.org/adyxax/bareos-zabbix-check/pkg/job"
+ "git.adyxax.org/adyxax/bareos-zabbix-check/pkg/spool"
+ "git.adyxax.org/adyxax/bareos-zabbix-check/pkg/state"
)
const (
diff --git a/zabbix/main_test.go b/pkg/zabbix/zabbix_test.go
index ca722f6..d623d41 100644
--- a/zabbix/main_test.go
+++ b/pkg/zabbix/zabbix_test.go
@@ -37,9 +37,9 @@ func TestMain(t *testing.T) {
{"failed bacula_auto_detect", 0, "tmp/bacula_auto_detect_failed", []string{}, "INFO Failed to init programm : Could not find a suitable state file. Has a job ever run?"},
{"failed bareos_auto_detect", 0, "tmp/bareos_auto_detect_failed", []string{}, "INFO Failed to init programm : Could not find a suitable state file. Has a job ever run?"},
{"failed auto_detect", 0, "tmp/non_existent", []string{}, "INFO Failed to init programm : Could not find a suitable work directory. Is bareos or bacula installed?"},
- {"no work directory", 0, "tmp", []string{"-w", "/non_existent"}, fmt.Sprintf("INFO Failed to init programm : Invalid work directory %s/zabbix/tmp/non_existent : it does not exist or is not a directory", wd)},
+ {"no work directory", 0, "tmp", []string{"-w", "/non_existent"}, fmt.Sprintf("INFO Failed to init programm : Invalid work directory %s/tmp/non_existent : it does not exist or is not a directory", wd)},
{"no state file auto_detect", 0, "tmp", []string{"-w", "/no_state_file"}, "INFO Failed to init programm : Could not find a suitable state file. Has a job ever run?"},
- {"no state file", 0, "tmp", []string{"-w", "/no_state_file", "-f", "test"}, fmt.Sprintf("INFO Failed to init programm : The state file %s/zabbix/tmp/no_state_file/test does not exist", wd},
+ {"no state file", 0, "tmp", []string{"-w", "/no_state_file", "-f", "test"}, fmt.Sprintf("INFO Failed to init programm : The state file %s/tmp/no_state_file/test does not exist", wd)},
{"ok bareos 18.2", 1582579731, "tmp/ok-18.2", []string{"-w", "/", "-f", "state"}, "OK"},
{"ok bareos 17.2", 1582579731, "tmp/ok-17.2", []string{"-w", "/", "-f", "state"}, "OK"},
{"missing", 1582709331, "tmp/ok-18.2", []string{"-w", "/", "-f", "state"}, "AVERAGE: missing: awhphpipam1_percona_xtrabackup, awhphpipam1_LinuxAll, awhphpipam1_www"},