Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If no-inventory=1 or any other deprecated no-XXX is set in agent.cfg, it should be ignored. Only no-inventory=1 is valid. Reported-by: Fabien Raux <vega@rulezlan.org>
- Loading branch information
Gonéri Le Bouder
committed
Dec 19, 2012
1 parent
b8658ec
commit 81041af
Showing
5 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use lib 't'; | ||
|
||
use File::Temp; | ||
use Test::More; | ||
|
||
use FusionInventory::Agent::Config; | ||
|
||
my %config = ( | ||
'sample1' => { | ||
'no-task' => ['snmpquery', 'wakeonlan', 'inventory'], | ||
'no-category' => ['software'] | ||
}, | ||
'sample2' => { | ||
'no-task' => [], | ||
'no-category' => ['printer', 'software'] | ||
}, | ||
'sample3' => { | ||
'no-task' => [], | ||
'no-category' => [] | ||
} | ||
|
||
); | ||
|
||
plan tests => (scalar keys %config) * 2; | ||
|
||
foreach my $test (keys %config) { | ||
my $c = FusionInventory::Agent::Config->new(options => { | ||
'conf-file' => "t/config/$test/agent.cfg" | ||
}); | ||
|
||
is_deeply($c->{'no-task'}, $config{$test}->{'no-task'}, "no-task"); | ||
is_deeply($c->{'no-category'}, $config{$test}->{'no-category'}, "no-category"); | ||
} | ||
|
||
#$config = FusionInventory::Agent::Config->new(options => { | ||
# 'conf-file' => 't/config/sample2/agent.cfg' | ||
# | ||
#}); | ||
# | ||
#is_deeply($config->{'no-task'}, , "no-task"); | ||
#is_deeply($config->{'no-category'}, , "no-category is not empty"); | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
no-inventory=1 | ||
no-task=snmpquery,wakeonlan | ||
no-software=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
no-inventory=0 | ||
no-software=1 | ||
no-category=printer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# no-inventory=1 |