remove trailing newline from os_ver, fixes netdisco #647 (#364)

* remove trailing newline from os_ver, fixes netdisco #647

* note why the newline is in the test

* also update tests

* typo
This commit is contained in:
nick n
2019-09-26 00:58:16 +02:00
committed by GitHub
parent 631f99f97b
commit f941f432e9
2 changed files with 26 additions and 5 deletions

View File

@@ -43,8 +43,11 @@ sub setup : Tests(setup) {
'_description' => 'Pulse Secure, LLC,Pulse Connect Secure,PSA-3000,8.2R7.2 (build 55673)',
# PULSESECURE-PSG-MIB::ivePSA3000
'_id' => '.1.3.6.1.4.1.12532.256.2.1',
'store' => {},
# _pulse_os_ver newline is intentional, this is what the appliance returns
# see netdisco github issue #647
'_id' => '.1.3.6.1.4.1.12532.256.2.1',
'_pulse_os_ver' => "8.3R7.1 (build 65025)\n",
'store' => {},
};
$test->{info}->cache($cache_data);
}
@@ -56,6 +59,13 @@ sub vendor : Tests(2) {
is($test->{info}->vendor(), 'pulsesecure', q(Vendor returns 'pulsesecure'));
}
sub os_ver : Tests(2) {
my $test = shift;
can_ok($test->{info}, 'os_ver');
is($test->{info}->os_ver(), '8.3R7.1 (build 65025)', q(os_ver returns '8.3R7.1 (build 65025)'));
}
sub os : Tests(2) {
my $test = shift;