** Copyright (C) 2001-2023 Zabbix SIA
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
func Test_statusHandler(t *testing.T) {
out := outStatus{OverallStatus: 0,
PgStates: map[string]uint64{"activating": 0, "active": 33, "backfill_toofull": 0, "backfill_unfound": 0,
"backfill_wait": 0, "backfilling": 0, "clean": 33, "creating": 0, "deep": 0, "degraded": 0, "down": 0,
"forced_backfill": 0, "forced_recovery": 0, "incomplete": 0, "inconsistent": 0, "laggy": 0, "peered": 0,
"peering": 0, "recovering": 0, "recovery_toofull": 0, "recovery_unfound": 0, "recovery_wait": 0,
"remapped": 0, "repair": 0, "scrubbing": 0, "snaptrim": 0, "snaptrim_error": 0, "snaptrim_wait": 0,
"stale": 0, "undersized": 0, "unknown": 0, "wait": 0},
MinMonReleaseName: "octopus"}
success, err := json.Marshal(out)
"Must parse an output of " + cmdStatus + "command",
args{map[command][]byte{cmdStatus: fixtures[cmdStatus]}},