Changeset 814
- Timestamp:
- 09/04/07 15:15:07 (1 year ago)
- Files:
-
- honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager.pm (modified) (8 diffs)
- honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager/FW.pm (modified) (1 diff)
- honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager/VM.pm (modified) (2 diffs)
- honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager/VM/Clone.pm (modified) (1 diff)
- honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager.t (modified) (3 diffs)
- honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager_fw.t (modified) (1 diff)
- honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager_vm.t (modified) (1 diff)
- honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager_vm_clone.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager.pm
r813 r814 117 117 package HoneyClient::Manager; 118 118 119 # XXX: Disabled version check, Honeywall does not have Perl v5.8 installed.120 #use 5.008006;121 119 use strict; 122 120 use warnings FATAL => 'all'; … … 166 164 167 165 =begin testing 166 167 # Make sure ExtUtils::MakeMaker loads. 168 BEGIN { 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."); } 169 require_ok('ExtUtils::MakeMaker'); 170 can_ok('ExtUtils::MakeMaker', 'prompt'); 171 use ExtUtils::MakeMaker qw(prompt); 172 173 # Make sure Log::Log4perl loads 174 BEGIN { 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 } 186 require_ok('Log::Log4perl'); 187 use Log::Log4perl qw(:easy); 188 189 # Make sure HoneyClient::Util::Config loads. 190 BEGIN { 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 } 202 require_ok('HoneyClient::Util::Config'); 203 can_ok('HoneyClient::Util::Config', 'getVar'); 204 use HoneyClient::Util::Config qw(getVar); 205 206 # Suppress all logging messages, since we need clean output for unit testing. 207 Log::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 }); 168 214 169 215 # Make sure the module loads properly, with the exportable … … 175 221 use HoneyClient::Manager qw(init destroy); 176 222 223 # Make sure HonyClient::Manager::VM::Clone loads. 224 BEGIN { 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."); } 225 require_ok('HoneyClient::Manager::VM::Clone'); 226 use HoneyClient::Manager::VM::Clone; 227 177 228 # Make sure HoneyClient::Util::SOAP loads. 178 229 BEGIN { 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."); } … … 247 298 use MIME::Base64 qw(encode_base64 decode_base64); 248 299 249 # Include FW Utility Library250 # TODO: Include unit tests.251 #use HoneyClient::Manager::FW;252 253 300 # Include Hash Serialization Utility Libraries 254 # TODO: Include unit tests.255 301 use Storable qw(nfreeze thaw); 256 302 … … 265 311 use IO::File; 266 312 267 # TODO: Include unit tests.268 313 # Include Logging Library 269 314 use Log::Log4perl qw(:easy); … … 333 378 =back 334 379 335 =begin testing336 380 #=begin testing 381 # 337 382 # XXX: Test init() method. 338 339 =end testing383 # 384 #=end testing 340 385 341 386 =cut … … 363 408 =back 364 409 365 =begin testing366 410 #=begin testing 411 # 367 412 # XXX: Test destroy() method. 368 369 # TODO: delete this. 370 #exit; 371 372 =end testing 413 # 414 #=end testing 373 415 374 416 =cut … … 509 551 =back 510 552 511 =begin testing512 553 #=begin testing 554 # 513 555 # XXX: Fill this in. 514 515 =end testing556 # 557 #=end testing 516 558 517 559 =cut honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager/FW.pm
r808 r814 231 231 # Make sure the module loads properly, with the exportable 232 232 # functions shared. 233 BEGIN { use_ok('HoneyClient::Manager::FW', qw(init_fw destroy_fw _getVMName)) or diag("Can't load HoneyClient::Manager: VMpackage. Check to make sure the package library is correctly listed within the path."); }233 BEGIN { 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."); } 234 234 require_ok('HoneyClient::Manager::FW'); 235 235 can_ok('HoneyClient::Manager::FW', 'init_fw'); honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager/VM.pm
r810 r814 39 39 =head1 VERSION 40 40 41 This documentation refers to HoneyClient::Manager: VM version 0.99.41 This documentation refers to HoneyClient::Manager::VM version 0.99. 42 42 43 43 =head1 SYNOPSIS … … 415 415 # Make sure the module loads properly, with the exportable 416 416 # 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."); }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."); } 418 418 require_ok('HoneyClient::Manager::VM'); 419 419 can_ok('HoneyClient::Manager::VM', 'init'); honeyclient/branches/exp/kindlund-dynamic_updates/lib/HoneyClient/Manager/VM/Clone.pm
r811 r814 228 228 229 229 # 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."); }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."); } 231 231 require_ok('HoneyClient::Manager::VM'); 232 232 use HoneyClient::Manager::VM; honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager.t
r131 r814 9 9 # =begin testing 10 10 { 11 # Make sure ExtUtils::MakeMaker loads. 12 BEGIN { 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."); } 13 require_ok('ExtUtils::MakeMaker'); 14 can_ok('ExtUtils::MakeMaker', 'prompt'); 15 use ExtUtils::MakeMaker qw(prompt); 16 17 # Make sure Log::Log4perl loads 18 BEGIN { 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 } 30 require_ok('Log::Log4perl'); 31 use Log::Log4perl qw(:easy); 32 33 # Make sure HoneyClient::Util::Config loads. 34 BEGIN { 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 } 46 require_ok('HoneyClient::Util::Config'); 47 can_ok('HoneyClient::Util::Config', 'getVar'); 48 use HoneyClient::Util::Config qw(getVar); 49 50 # Suppress all logging messages, since we need clean output for unit testing. 51 Log::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 11 59 # Make sure the module loads properly, with the exportable 12 60 # functions shared. … … 16 64 can_ok('HoneyClient::Manager', 'destroy'); 17 65 use HoneyClient::Manager qw(init destroy); 66 67 # Make sure HonyClient::Manager::VM::Clone loads. 68 BEGIN { 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."); } 69 require_ok('HoneyClient::Manager::VM::Clone'); 70 use HoneyClient::Manager::VM::Clone; 18 71 19 72 # Make sure HoneyClient::Util::SOAP loads. … … 47 100 48 101 49 # =begin testing50 {51 # XXX: Test init() method.52 }53 54 55 56 # =begin testing57 {58 # XXX: Test destroy() method.59 60 # TODO: delete this.61 #exit;62 }63 64 65 66 # =begin testing67 {68 # XXX: Fill this in.69 }70 71 72 73 102 74 103 1; honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager_fw.t
r234 r814 71 71 # Make sure the module loads properly, with the exportable 72 72 # functions shared. 73 BEGIN { use_ok('HoneyClient::Manager::FW', qw(init_fw destroy_fw _getVMName)) or diag("Can't load HoneyClient::Manager: VMpackage. Check to make sure the package library is correctly listed within the path."); }73 BEGIN { 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."); } 74 74 require_ok('HoneyClient::Manager::FW'); 75 75 can_ok('HoneyClient::Manager::FW', 'init_fw'); honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager_vm.t
r791 r814 69 69 # Make sure the module loads properly, with the exportable 70 70 # 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."); }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."); } 72 72 require_ok('HoneyClient::Manager::VM'); 73 73 can_ok('HoneyClient::Manager::VM', 'init'); honeyclient/branches/exp/kindlund-dynamic_updates/t/honeyclient_manager_vm_clone.t
r810 r814 56 56 57 57 # 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."); }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."); } 59 59 require_ok('HoneyClient::Manager::VM'); 60 60 use HoneyClient::Manager::VM;
