Changeset 814

Show
Ignore:
Timestamp:
09/04/07 15:15:07 (1 year ago)
Author:
kindlund
Message:

Fixed minor documentation typos. Updated Manager unit tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager.pm

    r813 r814  
    117117package HoneyClient::Manager; 
    118118 
    119 # XXX: Disabled version check, Honeywall does not have Perl v5.8 installed. 
    120 #use 5.008006; 
    121119use strict; 
    122120use warnings FATAL => 'all'; 
     
    166164 
    167165=begin testing 
     166 
     167# Make sure ExtUtils::MakeMaker loads. 
     168BEGIN { use_ok('ExtUtils::MakeMaker', qw(prompt)) or diag("Can't load ExtUtils::MakeMaker package.  Check to make sure the package library is correctly listed within the path."); } 
     169require_ok('ExtUtils::MakeMaker'); 
     170can_ok('ExtUtils::MakeMaker', 'prompt'); 
     171use ExtUtils::MakeMaker qw(prompt); 
     172 
     173# Make sure Log::Log4perl loads 
     174BEGIN { use_ok('Log::Log4perl', qw(:nowarn)) 
     175        or diag("Can't load Log::Log4perl package. Check to make sure the package library is correctly listed within the path."); 
     176        
     177        # Suppress all logging messages, since we need clean output for unit testing. 
     178        Log::Log4perl->init({ 
     179            "log4perl.rootLogger"                               => "DEBUG, Buffer", 
     180            "log4perl.appender.Buffer"                          => "Log::Log4perl::Appender::TestBuffer", 
     181            "log4perl.appender.Buffer.min_level"                => "fatal", 
     182            "log4perl.appender.Buffer.layout"                   => "Log::Log4perl::Layout::PatternLayout", 
     183            "log4perl.appender.Buffer.layout.ConversionPattern" => "%d{yyyy-MM-dd HH:mm:ss} %5p [%M] (%F:%L) - %m%n", 
     184        }); 
     185} 
     186require_ok('Log::Log4perl'); 
     187use Log::Log4perl qw(:easy); 
     188 
     189# Make sure HoneyClient::Util::Config loads. 
     190BEGIN { use_ok('HoneyClient::Util::Config', qw(getVar)) 
     191        or diag("Can't load HoneyClient::Util::Config package.  Check to make sure the package library is correctly listed within the path."); 
     192 
     193        # Suppress all logging messages, since we need clean output for unit testing. 
     194        Log::Log4perl->init({ 
     195            "log4perl.rootLogger"                               => "DEBUG, Buffer", 
     196            "log4perl.appender.Buffer"                          => "Log::Log4perl::Appender::TestBuffer", 
     197            "log4perl.appender.Buffer.min_level"                => "fatal", 
     198            "log4perl.appender.Buffer.layout"                   => "Log::Log4perl::Layout::PatternLayout", 
     199            "log4perl.appender.Buffer.layout.ConversionPattern" => "%d{yyyy-MM-dd HH:mm:ss} %5p [%M] (%F:%L) - %m%n", 
     200        }); 
     201} 
     202require_ok('HoneyClient::Util::Config'); 
     203can_ok('HoneyClient::Util::Config', 'getVar'); 
     204use HoneyClient::Util::Config qw(getVar); 
     205 
     206# Suppress all logging messages, since we need clean output for unit testing. 
     207Log::Log4perl->init({ 
     208    "log4perl.rootLogger"                               => "DEBUG, Buffer", 
     209    "log4perl.appender.Buffer"                          => "Log::Log4perl::Appender::TestBuffer", 
     210    "log4perl.appender.Buffer.min_level"                => "fatal", 
     211    "log4perl.appender.Buffer.layout"                   => "Log::Log4perl::Layout::PatternLayout", 
     212    "log4perl.appender.Buffer.layout.ConversionPattern" => "%d{yyyy-MM-dd HH:mm:ss} %5p [%M] (%F:%L) - %m%n", 
     213}); 
    168214 
    169215# Make sure the module loads properly, with the exportable 
     
    175221use HoneyClient::Manager qw(init destroy); 
    176222 
     223# Make sure HonyClient::Manager::VM::Clone loads. 
     224BEGIN { use_ok('HoneyClient::Manager::VM::Clone') or diag("Can't load HoneyClient::Manager::VM::Clone package.  Check to make sure the package library is correctly listed within the path."); } 
     225require_ok('HoneyClient::Manager::VM::Clone'); 
     226use HoneyClient::Manager::VM::Clone; 
     227 
    177228# Make sure HoneyClient::Util::SOAP loads. 
    178229BEGIN { use_ok('HoneyClient::Util::SOAP', qw(getServerHandle getClientHandle)) or diag("Can't load HoneyClient::Util::SOAP package.  Check to make sure the package library is correctly listed within the path."); } 
     
    247298use MIME::Base64 qw(encode_base64 decode_base64); 
    248299 
    249 # Include FW Utility Library 
    250 # TODO: Include unit tests. 
    251 #use HoneyClient::Manager::FW; 
    252  
    253300# Include Hash Serialization Utility Libraries 
    254 # TODO: Include unit tests. 
    255301use Storable qw(nfreeze thaw); 
    256302 
     
    265311use IO::File; 
    266312 
    267 # TODO: Include unit tests. 
    268313# Include Logging Library 
    269314use Log::Log4perl qw(:easy); 
     
    333378=back 
    334379 
    335 =begin testing 
    336  
     380#=begin testing 
     381
    337382# XXX: Test init() method. 
    338  
    339 =end testing 
     383
     384#=end testing 
    340385 
    341386=cut 
     
    363408=back 
    364409 
    365 =begin testing 
    366  
     410#=begin testing 
     411
    367412# XXX: Test destroy() method. 
    368  
    369 # TODO: delete this. 
    370 #exit; 
    371  
    372 =end testing 
     413
     414#=end testing 
    373415 
    374416=cut 
     
    509551=back 
    510552 
    511 =begin testing 
    512  
     553#=begin testing 
     554
    513555# XXX: Fill this in. 
    514  
    515 =end testing 
     556
     557#=end testing 
    516558 
    517559=cut 
  • honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager/FW.pm

    r808 r814  
    231231# Make sure the module loads properly, with the exportable 
    232232# functions shared. 
    233 BEGIN { use_ok('HoneyClient::Manager::FW', qw(init_fw destroy_fw _getVMName)) or diag("Can't load HoneyClient::Manager:VM package.  Check to make sure the package library is correctly listed within the path."); } 
     233BEGIN { use_ok('HoneyClient::Manager::FW', qw(init_fw destroy_fw _getVMName)) or diag("Can't load HoneyClient::Manager::FW package.  Check to make sure the package library is correctly listed within the path."); } 
    234234require_ok('HoneyClient::Manager::FW'); 
    235235can_ok('HoneyClient::Manager::FW', 'init_fw'); 
  • honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager/VM.pm

    r810 r814  
    3939=head1 VERSION 
    4040 
    41 This documentation refers to HoneyClient::Manager:VM version 0.99. 
     41This documentation refers to HoneyClient::Manager::VM version 0.99. 
    4242 
    4343=head1 SYNOPSIS 
     
    415415# Make sure the module loads properly, with the exportable 
    416416# functions shared. 
    417 BEGIN { use_ok('HoneyClient::Manager::VM') or diag("Can't load HoneyClient::Manager:VM package.  Check to make sure the package library is correctly listed within the path."); } 
     417BEGIN { use_ok('HoneyClient::Manager::VM') or diag("Can't load HoneyClient::Manager::VM package.  Check to make sure the package library is correctly listed within the path."); } 
    418418require_ok('HoneyClient::Manager::VM'); 
    419419can_ok('HoneyClient::Manager::VM', 'init'); 
  • honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager/VM/Clone.pm

    r811 r814  
    228228 
    229229# Make sure HoneyClient::Manager::VM loads. 
    230 BEGIN { use_ok('HoneyClient::Manager::VM') or diag("Can't load HoneyClient::Manager:VM package.  Check to make sure the package library is correctly listed within the path."); } 
     230BEGIN { use_ok('HoneyClient::Manager::VM') or diag("Can't load HoneyClient::Manager::VM package.  Check to make sure the package library is correctly listed within the path."); } 
    231231require_ok('HoneyClient::Manager::VM'); 
    232232use HoneyClient::Manager::VM; 
  • honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager.t

    r131 r814  
    99# =begin testing 
    1010{ 
     11# Make sure ExtUtils::MakeMaker loads. 
     12BEGIN { use_ok('ExtUtils::MakeMaker', qw(prompt)) or diag("Can't load ExtUtils::MakeMaker package.  Check to make sure the package library is correctly listed within the path."); } 
     13require_ok('ExtUtils::MakeMaker'); 
     14can_ok('ExtUtils::MakeMaker', 'prompt'); 
     15use ExtUtils::MakeMaker qw(prompt); 
     16 
     17# Make sure Log::Log4perl loads 
     18BEGIN { use_ok('Log::Log4perl', qw(:nowarn)) 
     19        or diag("Can't load Log::Log4perl package. Check to make sure the package library is correctly listed within the path."); 
     20        
     21        # Suppress all logging messages, since we need clean output for unit testing. 
     22        Log::Log4perl->init({ 
     23            "log4perl.rootLogger"                               => "DEBUG, Buffer", 
     24            "log4perl.appender.Buffer"                          => "Log::Log4perl::Appender::TestBuffer", 
     25            "log4perl.appender.Buffer.min_level"                => "fatal", 
     26            "log4perl.appender.Buffer.layout"                   => "Log::Log4perl::Layout::PatternLayout", 
     27            "log4perl.appender.Buffer.layout.ConversionPattern" => "%d{yyyy-MM-dd HH:mm:ss} %5p [%M] (%F:%L) - %m%n", 
     28        }); 
     29} 
     30require_ok('Log::Log4perl'); 
     31use Log::Log4perl qw(:easy); 
     32 
     33# Make sure HoneyClient::Util::Config loads. 
     34BEGIN { use_ok('HoneyClient::Util::Config', qw(getVar)) 
     35        or diag("Can't load HoneyClient::Util::Config package.  Check to make sure the package library is correctly listed within the path."); 
     36 
     37        # Suppress all logging messages, since we need clean output for unit testing. 
     38        Log::Log4perl->init({ 
     39            "log4perl.rootLogger"                               => "DEBUG, Buffer", 
     40            "log4perl.appender.Buffer"                          => "Log::Log4perl::Appender::TestBuffer", 
     41            "log4perl.appender.Buffer.min_level"                => "fatal", 
     42            "log4perl.appender.Buffer.layout"                   => "Log::Log4perl::Layout::PatternLayout", 
     43            "log4perl.appender.Buffer.layout.ConversionPattern" => "%d{yyyy-MM-dd HH:mm:ss} %5p [%M] (%F:%L) - %m%n", 
     44        }); 
     45} 
     46require_ok('HoneyClient::Util::Config'); 
     47can_ok('HoneyClient::Util::Config', 'getVar'); 
     48use HoneyClient::Util::Config qw(getVar); 
     49 
     50# Suppress all logging messages, since we need clean output for unit testing. 
     51Log::Log4perl->init({ 
     52    "log4perl.rootLogger"                               => "DEBUG, Buffer", 
     53    "log4perl.appender.Buffer"                          => "Log::Log4perl::Appender::TestBuffer", 
     54    "log4perl.appender.Buffer.min_level"                => "fatal", 
     55    "log4perl.appender.Buffer.layout"                   => "Log::Log4perl::Layout::PatternLayout", 
     56    "log4perl.appender.Buffer.layout.ConversionPattern" => "%d{yyyy-MM-dd HH:mm:ss} %5p [%M] (%F:%L) - %m%n", 
     57}); 
     58 
    1159# Make sure the module loads properly, with the exportable 
    1260# functions shared. 
     
    1664can_ok('HoneyClient::Manager', 'destroy'); 
    1765use HoneyClient::Manager qw(init destroy); 
     66 
     67# Make sure HonyClient::Manager::VM::Clone loads. 
     68BEGIN { use_ok('HoneyClient::Manager::VM::Clone') or diag("Can't load HoneyClient::Manager::VM::Clone package.  Check to make sure the package library is correctly listed within the path."); } 
     69require_ok('HoneyClient::Manager::VM::Clone'); 
     70use HoneyClient::Manager::VM::Clone; 
    1871 
    1972# Make sure HoneyClient::Util::SOAP loads. 
     
    47100 
    48101 
    49 # =begin testing 
    50 { 
    51 # XXX: Test init() method. 
    52 } 
    53  
    54  
    55  
    56 # =begin testing 
    57 { 
    58 # XXX: Test destroy() method. 
    59  
    60 # TODO: delete this. 
    61 #exit; 
    62 } 
    63  
    64  
    65  
    66 # =begin testing 
    67 { 
    68 # XXX: Fill this in. 
    69 } 
    70  
    71  
    72  
    73102 
    741031; 
  • honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager_fw.t

    r234 r814  
    7171# Make sure the module loads properly, with the exportable 
    7272# functions shared. 
    73 BEGIN { use_ok('HoneyClient::Manager::FW', qw(init_fw destroy_fw _getVMName)) or diag("Can't load HoneyClient::Manager:VM package.  Check to make sure the package library is correctly listed within the path."); } 
     73BEGIN { use_ok('HoneyClient::Manager::FW', qw(init_fw destroy_fw _getVMName)) or diag("Can't load HoneyClient::Manager::FW package.  Check to make sure the package library is correctly listed within the path."); } 
    7474require_ok('HoneyClient::Manager::FW'); 
    7575can_ok('HoneyClient::Manager::FW', 'init_fw'); 
  • honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager_vm.t

    r791 r814  
    6969# Make sure the module loads properly, with the exportable 
    7070# functions shared. 
    71 BEGIN { use_ok('HoneyClient::Manager::VM') or diag("Can't load HoneyClient::Manager:VM package.  Check to make sure the package library is correctly listed within the path."); } 
     71BEGIN { use_ok('HoneyClient::Manager::VM') or diag("Can't load HoneyClient::Manager::VM package.  Check to make sure the package library is correctly listed within the path."); } 
    7272require_ok('HoneyClient::Manager::VM'); 
    7373can_ok('HoneyClient::Manager::VM', 'init'); 
  • honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager_vm_clone.t

    r810 r814  
    5656 
    5757# Make sure HoneyClient::Manager::VM loads. 
    58 BEGIN { use_ok('HoneyClient::Manager::VM') or diag("Can't load HoneyClient::Manager:VM package.  Check to make sure the package library is correctly listed within the path."); } 
     58BEGIN { use_ok('HoneyClient::Manager::VM') or diag("Can't load HoneyClient::Manager::VM package.  Check to make sure the package library is correctly listed within the path."); } 
    5959require_ok('HoneyClient::Manager::VM'); 
    6060use HoneyClient::Manager::VM;