Inca::Net::MockAgent - Emulates an Inca agent (for testing purposes only)
use Inca::Net::MockAgent; my $agent = new Inca::Net::MockAgent( 3432, "ca1", "t/certs/trusted" ); my ($conn, $numStmts, @responses) = $agent->accept( "REGISTER" => [ 'OK', 'END'], ); $conn->close(); $agent->stop();
Emulates the actions of a agent so we can test out the functionality of the reporter manager.
Starts SSL server on $port using the CA certificate $ca and trusted cert dir. Returns a new Inca::Net::MockAgent object.
An integer representing the port number the mock agent should listen on.
A string containing the name of the CA in t/certs to use
A string containing the path to the trusted CA dir or file
Accepts a connection to the mock agent. %commands is a hash array where the keys are patterns to expect from the manager and the value is an array of commands to send in response
A hash array where the keys are patterns of commands to accept from the manager and the values are an array of responses to send back.
Stop mock agent.
Shava Smallen <firstname.lastname@example.org>
Describe any known problems.