Inca::Net::MockDepot - Emulates an Inca depot (for testing purposes only)
use Inca::Net::MockDepot; my $depot = new Inca::Net::MockDepot(); my $numReports = $depot->readReportsFromSSL( 4, 8434, "ca1", "t/certs/trusted" ); $numReports = $depot->readReportsFromFile("./depot.tmp.$$", 0)
Emulates the actions of a depot so we can test out the functionality of the reporter manager.
Class constructor which returns a new Inca::Net::MockDepot object.
Return the number of reports successfully received by the mock depot.
Returns:
An integer containing the number of reports successfully received by the mock depot.
Return an array of strings containing reports read by the mock depot.
Returns:
An array of strings containing the reports successfully received by the mock depot.
Read a report from file and clean the file from disk.
Returns:
True upon successful read and false otherwise.
Starts SSL server on $port using the CA certificate $ca and trusted cert dir and accepts $numReports from clients.
Arguments:
- numReports
The number of connections the mock depot should accept
- port
An integer representing the port number the mock depot should listen on.
- ca
A string containing the name of the CA in t/certs to use
- trusted
A string containing the path to the trusted CA dir or file
Options:
- trust_type
Indicates whether trusted is a file or dir [default: dir]
Shava Smallen <ssmallen@sdsc.edu>
No known problems.