| 1 |
root@honey3:~/honeyclient# perl -Ilib t/honeyclient_manager_vm.t |
|---|
| 2 |
ok 1 - use ExtUtils::MakeMaker; |
|---|
| 3 |
ok 2 - use Log::Log4perl; |
|---|
| 4 |
ok 3 - use HoneyClient::Util::Config; |
|---|
| 5 |
ok 4 - use HoneyClient::Manager::VM; |
|---|
| 6 |
ok 5 - use HoneyClient::Util::SOAP; |
|---|
| 7 |
ok 6 - use File::Basename; |
|---|
| 8 |
ok 7 - use File::Copy::Recursive; |
|---|
| 9 |
ok 8 - use Data::Dumper; |
|---|
| 10 |
ok 9 - use File::stat; |
|---|
| 11 |
ok 10 - use Digest::MD5; |
|---|
| 12 |
ok 11 - use DateTime::HiRes; |
|---|
| 13 |
ok 12 - use Fcntl; |
|---|
| 14 |
ok 13 - use VMware::VmPerl; |
|---|
| 15 |
ok 14 - use VMware::VmPerl::Server; |
|---|
| 16 |
ok 15 - use VMware::VmPerl::ConnectParams; |
|---|
| 17 |
ok 16 - use VMware::VmPerl::VM; |
|---|
| 18 |
ok 17 - use VMware::VmPerl::Question; |
|---|
| 19 |
ok 18 - use threads; |
|---|
| 20 |
ok 19 - use threads::shared; |
|---|
| 21 |
ok 20 - use Thread::Queue; |
|---|
| 22 |
ok 21 - use Thread::Semaphore; |
|---|
| 23 |
ok 22 - require ExtUtils::MakeMaker; |
|---|
| 24 |
ok 23 - ExtUtils::MakeMaker->can('prompt') |
|---|
| 25 |
# About to run basic unit tests. |
|---|
| 26 |
# Note: These tests *expect* VMware Server or VMware GSX to be installed and running on this system beforehand. |
|---|
| 27 |
# Do you want to run basic tests? [yes] |
|---|
| 28 |
ok 24 - require Log::Log4perl; |
|---|
| 29 |
ok 25 - require HoneyClient::Util::Config; |
|---|
| 30 |
ok 26 - HoneyClient::Util::Config->can('getVar') |
|---|
| 31 |
ok 27 - require HoneyClient::Manager::VM; |
|---|
| 32 |
ok 28 - HoneyClient::Manager::VM->can('init') |
|---|
| 33 |
ok 29 - HoneyClient::Manager::VM->can('destroy') |
|---|
| 34 |
ok 30 - require HoneyClient::Util::SOAP; |
|---|
| 35 |
ok 31 - HoneyClient::Util::SOAP->can('getServerHandle') |
|---|
| 36 |
ok 32 - HoneyClient::Util::SOAP->can('getClientHandle') |
|---|
| 37 |
ok 33 - require File::Basename; |
|---|
| 38 |
ok 34 - File::Basename->can('dirname') |
|---|
| 39 |
ok 35 - File::Basename->can('basename') |
|---|
| 40 |
ok 36 - require File::Copy::Recursive; |
|---|
| 41 |
ok 37 - File::Copy::Recursive->can('dircopy') |
|---|
| 42 |
ok 38 - File::Copy::Recursive->can('pathrmdir') |
|---|
| 43 |
ok 39 - require Data::Dumper; |
|---|
| 44 |
ok 40 - require File::stat; |
|---|
| 45 |
ok 41 - require Digest::MD5; |
|---|
| 46 |
ok 42 - Digest::MD5->can('md5_hex') |
|---|
| 47 |
ok 43 - require DateTime::HiRes; |
|---|
| 48 |
ok 44 - require Fcntl; |
|---|
| 49 |
ok 45 - require VMware::VmPerl; |
|---|
| 50 |
ok 46 - require VMware::VmPerl::Server; |
|---|
| 51 |
ok 47 - require VMware::VmPerl::ConnectParams; |
|---|
| 52 |
ok 48 - require VMware::VmPerl::VM; |
|---|
| 53 |
ok 49 - require VMware::VmPerl::Question; |
|---|
| 54 |
ok 50 - require threads; |
|---|
| 55 |
ok 51 - require threads::shared; |
|---|
| 56 |
ok 52 - require Thread::Queue; |
|---|
| 57 |
ok 53 - require Thread::Semaphore; |
|---|
| 58 |
# About to run extended tests. |
|---|
| 59 |
# Note: These extended tests will take *significant* time to complete (10-30 minutes). |
|---|
| 60 |
# Do you want to run extended tests? [no] yes |
|---|
| 61 |
ok 54 - init() |
|---|
| 62 |
ok 55 - destroy() |
|---|
| 63 |
Subroutine LWP::UserAgent::redirect_ok redefined at /usr/local/share/perl/5.8.8/SOAP/Transport/HTTP.pm line 41, <STDIN> line 2. |
|---|
| 64 |
Subroutine LWP::Protocol::collect redefined at /usr/local/share/perl/5.8.8/SOAP/Transport/HTTP.pm line 59, <STDIN> line 2. |
|---|
| 65 |
ok 56 - isRegisteredVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 66 |
ok 57 - isRegisteredVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 67 |
ok 58 - enumerate() |
|---|
| 68 |
ok 59 - getStateVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 69 |
ok 60 - startVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 70 |
ok 61 - startVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 71 |
ok 62 - stopVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 72 |
ok 63 - stopVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 73 |
ok 64 - rebootVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 74 |
ok 65 - rebootVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 75 |
ok 66 - suspendVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 76 |
ok 67 - suspendVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 77 |
ok 68 - fullCloneVM(src_config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx', dest_dir => '/home/honeyusr/honeyclient/t/test_vm_clone') |
|---|
| 78 |
ok 69 - fullCloneVM(src_config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx', dest_dir => '/home/honeyusr/honeyclient/t/test_vm_clone') |
|---|
| 79 |
ok 70 - getNameVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 80 |
ok 71 - setNameVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx', name => 'newVM') |
|---|
| 81 |
ok 72 - setNameVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx', name => 'newVM') |
|---|
| 82 |
ok 73 - getMACaddrVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 83 |
ok 74 - getIPaddrVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 84 |
ok 75 - registerVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 85 |
ok 76 - registerVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 86 |
ok 77 - unregisterVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 87 |
ok 78 - unregisterVM(config => '/home/honeyusr/honeyclient/t/test_vm/winXPPro.vmx') |
|---|
| 88 |
ok 79 - answerVM(config => '/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx') |
|---|
| 89 |
ok 80 - destroyVM(config => '/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx') |
|---|
| 90 |
ok 81 - destroyVM(config => '/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx') |
|---|
| 91 |
ok 82 - setMasterVM(config => '/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx') |
|---|
| 92 |
ok 83 - setMasterVM(config => '/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx') |
|---|
| 93 |
ok 84 - setMasterVM(config => '/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx') |
|---|
| 94 |
ok 85 - setMasterVM(config => '/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx') |
|---|
| 95 |
ok 86 - setMasterVM(config => '/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx') |
|---|
| 96 |
ok 87 - setMasterVM(config => '/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx') |
|---|
| 97 |
not ok 88 - HoneyClient::Util::SOAP->handleFault(): Error occurred during processing. |
|---|
| 98 |
# HoneyClient::Manager::VM->rebootVM(): Could not reboot VM (/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx). |
|---|
| 99 |
# HoneyClient::Manager::VM->rebootVM(): {'err' => bless( {'errNo' => '-8','errStr' => 'Invalid operation for virtual machine\'s current state: The requested operation ("reset") could not be completed because it conflicted with the state of the virtual machine ("off") at the time the request was received. This error often occurs because the state of the virtual machine changed before it received the request.'}, 'err' )} |
|---|
| 100 |
# |
|---|
| 101 |
# Failed test 'HoneyClient::Util::SOAP->handleFault(): Error occurred during processing. |
|---|
| 102 |
# HoneyClient::Manager::VM->rebootVM(): Could not reboot VM (/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx). |
|---|
| 103 |
# HoneyClient::Manager::VM->rebootVM(): {'err' => bless( {'errNo' => '-8','errStr' => 'Invalid operation for virtual machine\'s current state: The requested operation ("reset") could not be completed because it conflicted with the state of the virtual machine ("off") at the time the request was received. This error often occurs because the state of the virtual machine changed before it received the request.'}, 'err' )} |
|---|
| 104 |
# ' |
|---|
| 105 |
# at t/honeyclient_manager_vm.t line 1235. |
|---|
| 106 |
ok 89 - snapshotVM(config => '/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx', snapshot_file => '/home/honeyusr/honeyclient/t/test_vm_clone.tar.gz') |
|---|
| 107 |
not ok 90 - HoneyClient::Util::SOAP->handleFault(): Error occurred during processing. |
|---|
| 108 |
# HoneyClient::Manager::VM->answerVM(): Could not answer known question for VM (/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx). |
|---|
| 109 |
# HoneyClient::Manager::VM->answerVM(): {'err' => bless( {'errNo' => '-16','errStr' => 'Virtual machine requires user input to continue'}, 'err' )} |
|---|
| 110 |
# |
|---|
| 111 |
# Failed test 'HoneyClient::Util::SOAP->handleFault(): Error occurred during processing. |
|---|
| 112 |
# HoneyClient::Manager::VM->answerVM(): Could not answer known question for VM (/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx). |
|---|
| 113 |
# HoneyClient::Manager::VM->answerVM(): {'err' => bless( {'errNo' => '-16','errStr' => 'Virtual machine requires user input to continue'}, 'err' )} |
|---|
| 114 |
# ' |
|---|
| 115 |
# at t/honeyclient_manager_vm.t line 1348. |
|---|
| 116 |
not ok 91 - HoneyClient::Util::SOAP->handleFault(): Error occurred during processing. |
|---|
| 117 |
# HoneyClient::Manager::VM->answerVM(): Encountered unknown question for VM (/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx). |
|---|
| 118 |
# HoneyClient::Manager::VM->answerVM(): {'err' => bless( {'errNo' => '255793301','errStr' => 'A redo log for disk "/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmdk" was found but the disk is marked as persistent. Select an action for the redo log. '}, 'err' )} |
|---|
| 119 |
# |
|---|
| 120 |
# Failed test 'HoneyClient::Util::SOAP->handleFault(): Error occurred during processing. |
|---|
| 121 |
# HoneyClient::Manager::VM->answerVM(): Encountered unknown question for VM (/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmx). |
|---|
| 122 |
# HoneyClient::Manager::VM->answerVM(): {'err' => bless( {'errNo' => '255793301','errStr' => 'A redo log for disk "/home/honeyusr/honeyclient/t/test_vm_clone/winXPPro.vmdk" was found but the disk is marked as persistent. Select an action for the redo log. '}, 'err' )} |
|---|
| 123 |
# ' |
|---|
| 124 |
# at t/honeyclient_manager_vm.t line 1460. |
|---|
| 125 |
1..91 |
|---|
| 126 |
# Looks like you failed 3 tests of 91. |
|---|