Retrieve Serial Number and device type for CheckPoint (#358)

* Retrieve Serial Number and device type for CheckPoint devices at right place in MIB

* Retrieve Serial Number and device type for CheckPoint

* Retrieve Serial Number and device type for CheckPoint

* Test not correct with cache data
This commit is contained in:
Ambroise
2019-10-02 19:48:56 +02:00
committed by nick n
parent 762a01e619
commit 51be2d5dc5
2 changed files with 64 additions and 27 deletions

View File

@@ -53,6 +53,10 @@ sub setup : Tests(setup) {
# CHECKPOINT-MIB::fw
'_id' => '.1.3.6.1.4.1.2620.1.1',
'store' => {},
'_serial_number' => '0123456789abcdef',
'_product_name' => 'Check Point 12200',
'_manufacturer' => 'Checkpoint',
'_version' => 'R80.20',
};
$test->{info}->cache($cache_data);
}
@@ -68,14 +72,28 @@ sub vendor : Tests(2) {
my $test = shift;
can_ok($test->{info}, 'vendor');
is($test->{info}->vendor(), 'checkpoint', q(Vendor returns 'checkpoint'));
is($test->{info}->vendor(), 'Checkpoint', q(Vendor returns 'Checkpoint'));
}
sub os_ver : Tests(2) {
my $test = shift;
can_ok($test->{info}, 'os_ver');
is($test->{info}->os_ver(), 'R80.20',q(OS Version return 'R80.20'));
}
sub serial : Tests(2) {
my $test = shift;
can_ok($test->{info}, 'serial');
is($test->{info}->serial(), '0123456789abcdef', q(Serial returns '0123456789abcdef'));
}
sub model : Tests(3) {
my $test = shift;
can_ok($test->{info}, 'model');
is($test->{info}->model(), 'fw', q(Model is expected value));
is($test->{info}->model(), 'Check Point 12200', q(Model is expected value));
$test->{info}->clear_cache();
is($test->{info}->model(), undef, q(No description returns undef model));