Changeset 1635

Show
Ignore:
Timestamp:
06/24/08 17:15:50 (5 months ago)
Author:
kindlund
Message:

Updated unit testing.

Files:

Legend:

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

    r1623 r1635  
    656656use Config; 
    657657SKIP: { 
    658     skip 'HoneyClient::Agent only works in Cygwin environment.', 11 if ($Config{osname} !~ /^cygwin$/); 
     658    skip 'HoneyClient::Agent only works in Cygwin environment.', 13 if ($Config{osname} !~ /^cygwin$/); 
    659659 
    660660    # Shared test variables. 
     
    13091309          ], 
    13101310          'time_at' => '2008-04-02 21:44:40.376', 
    1311           'work_status' => 'completed', 
    13121311        }; 
    13131312 
     
    13421341        fail($@); 
    13431342    } 
     1343    diag("Note: If applicable, be sure to delete any STRACE.LOG files that remain on the Desktop."); 
    13441344} 
    13451345 
  • honeyclient/branches/exp/kindlund-strace/t/honeyclient_agent.t

    r1499 r1635  
    107107use DateTime::HiRes; 
    108108 
     109# Make sure Filesys::CygwinPaths loads. 
     110BEGIN { use_ok('Filesys::CygwinPaths') or diag("Can't load Filesys::CygwinPaths package.  Check to make sure the package library is correctly listed within the path."); } 
     111require_ok('Filesys::CygwinPaths'); 
     112use Filesys::CygwinPaths qw(:all); 
     113 
     114# Make sure File::Basename loads. 
     115BEGIN { use_ok('File::Basename', qw(basename dirname)) or diag("Can't load File::Basename package.  Check to make sure the package library is correctly listed within the path."); } 
     116require_ok('File::Basename'); 
     117can_ok('File::Basename', 'basename'); 
     118can_ok('File::Basename', 'dirname'); 
     119use File::Basename qw(basename dirname); 
     120 
    109121# Make sure Data::Dumper loads. 
    110122BEGIN { use_ok('Data::Dumper') or diag("Can't load Data::Dumper package.  Check to make sure the package library is correctly listed within the path."); } 
     
    179191use Config; 
    180192SKIP: { 
    181     skip 'HoneyClient::Agent only works in Cygwin environment.', 11 if ($Config{osname} !~ /^cygwin$/); 
     193    skip 'HoneyClient::Agent only works in Cygwin environment.', 13 if ($Config{osname} !~ /^cygwin$/); 
    182194 
    183195    # Shared test variables. 
     
    212224        ok($changes, "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
    213225        ok(exists($changes->{'status'}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
     226        ok(exists($changes->{'work_status'}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
    214227        ok(exists($changes->{'time_at'}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
    215228        ok(exists($changes->{'fingerprint'}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
     
    830843            } 
    831844          ], 
    832           'time_at' => '2008-04-02 21:44:40.376' 
     845          'time_at' => '2008-04-02 21:44:40.376', 
    833846        }; 
    834847 
     
    844857        ok(exists($changes->{'time_at'}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
    845858        ok(exists($changes->{'fingerprint'}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
     859        ok(exists($changes->{'work_status'}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
    846860 
    847861        # Check that os_processes is not empty. 
     
    862876        fail($@); 
    863877    } 
     878    diag("Note: If applicable, be sure to delete any STRACE.LOG files that remain on the Desktop."); 
    864879} 
    865880}