Changeset 1429

Show
Ignore:
Timestamp:
04/02/08 21:39:37 (6 months ago)
Author:
kindlund
Message:

Updated unit tests.

Files:

Legend:

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

    r1428 r1429  
    557557                                address   => "localhost"); 
    558558 
    559         diag("Driving HoneyClient::Agent::Driver::Browser::IE with no parameters..."); 
     559        # Make sure the realtime_changes_file exists and is 0 bytes. 
     560        my $realtime_changes_file = getVar(name      => 'realtime_changes_file', 
     561                                           namespace => 'HoneyClient::Agent::Integrity'); 
     562        open(REALTIME_CHANGES_FILE, ">", $realtime_changes_file); 
     563        close(REALTIME_CHANGES_FILE);  
     564 
     565        diag("Driving HoneyClient::Agent::Driver::Browser::IE with no parameters and no changes..."); 
    560566 
    561567        # Drive the Agent using IE. 
     
    578584        ok(!scalar(@{$changes->{'fingerprint'}->{os_processes}}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
    579585 
     586        # Delete the mock realtime_changes_file. 
     587        unlink($realtime_changes_file); 
    580588    }; 
    581589 
     
    675683                       ->faultstring("Error: Unable to execute '" . $processExec . "'"); 
    676684    } 
    677     $ret->{'status'} = $status; 
    678685 
    679686    $LOG->info($args{'driver_name'} . " - Driving To Resource: " . $args{'parameters'}); 
     
    684691    # Check to see if run fails. 
    685692    $status = $job->status(); 
     693    $ret->{'status'} = $status; 
    686694 
    687695    # Sanity check. 
  • honeyclient/branches/exp/kindlund-simpler_agent/t/honeyclient_agent.t

    r1428 r1429  
    186186                                address   => "localhost"); 
    187187 
    188         diag("Driving HoneyClient::Agent::Driver::Browser::IE with no parameters..."); 
     188        # Make sure the realtime_changes_file exists and is 0 bytes. 
     189        my $realtime_changes_file = getVar(name      => 'realtime_changes_file', 
     190                                           namespace => 'HoneyClient::Agent::Integrity'); 
     191        open(REALTIME_CHANGES_FILE, ">", $realtime_changes_file); 
     192        close(REALTIME_CHANGES_FILE);  
     193 
     194        diag("Driving HoneyClient::Agent::Driver::Browser::IE with no parameters and no changes..."); 
    189195 
    190196        # Drive the Agent using IE. 
     
    207213        ok(!scalar(@{$changes->{'fingerprint'}->{os_processes}}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
    208214 
     215        # Delete the mock realtime_changes_file. 
     216        unlink($realtime_changes_file); 
    209217    }; 
    210218