Bug 37810: Consider ServiceActive on status response

Some SUSHI providers return ServiceActive instead of the documented Service_Active:
https://countermetrics.stoplight.io/docs/counter-sushi-api/f0dd30f814944-server-status

This ensures the test connection does not fail regardless of what is used

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Pedro Amorim 2024-09-02 14:51:31 +00:00 committed by Martin Renvoize
parent 2eef068fdf
commit fa6cd2f9b7
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 2 additions and 2 deletions

View File

@ -294,10 +294,10 @@ sub test_connection {
my $status;
if ( ref($result) eq 'ARRAY' ) {
for my $r (@$result) {
$status = $r->{Service_Active};
$status = $r->{Service_Active} // $r->{ServiceActive};
}
} else {
$status = $result->{Service_Active};
$status = $result->{Service_Active} // $result->{ServiceActive};
}
if ($status) {