| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
edu.sdsc.inca.agent.ReporterManagerControllerTest
public class ReporterManagerControllerTest
Tests for ReporterManagerController (and ReporterManagerStarter).
| Nested Class Summary | |
|---|---|
| static class | ReporterManagerControllerTest.MockAgentEmulates the agent's tasks | 
| Constructor Summary | |
|---|---|
| ReporterManagerControllerTest() | |
| Method Summary | |
|---|---|
|  ReporterManagerController | createRM(boolean secure,
         boolean repository,
         edu.sdsc.inca.util.ResourcesWrapper resources,
         java.lang.String resource)Create a reporter manager object using the specified uri as the contact to the agent. | 
| static edu.sdsc.inca.util.SuiteWrapper | createSampleSuite(java.lang.String resource)Create a sample suite document and create the reporter uris relative to the specified repository path. | 
| static java.net.ServerSocket | createSSLSocket(int port)Create a SSL server socket | 
|  void | runCreateAndSubscribe(boolean auth)Test the reporter manager's create and sendSuite functions. | 
|  void | setUp()Read properties, initialize member variables, and delete var directory | 
|  void | startAndRegisterRMC(boolean secure,
                    boolean repository,
                    edu.sdsc.inca.util.ResourcesWrapper resources,
                    int numConnections,
                    java.lang.String resource)Start up a remote reporter manager and a mock agent. | 
| static java.util.Hashtable | storeProxy(edu.sdsc.inca.util.ResourcesWrapper resources)Using the MyProxy server configuration in the resources file, store a proxy in the MyProxy server. | 
|  void | tearDown()Close reporter manager controller and mock agent if used in test | 
|  void | testCreateAndSuite()Test the reporter manager's create and sendSuite functions. | 
|  void | testCreateAndSuiteAuth()Same as testCreateAndSuite but with authentication turned on | 
|  void | testGetUris()Test the ability to get URIs from a suite | 
|  void | testInterrupt()Test that interrupts at different stages in the run function will cause the run thread to exit appropriately. | 
|  void | testIsRemoteManagerAlive()Test the reporter manager's isRemoteManagerAlive function | 
|  void | testManual()Test the reporter manager's stage function which installs a reporter manager distribution on a remote resource. | 
|  void | testPackage()Test the reporter manager's addPackage function | 
|  void | testParseWorkingDir()Test the ability to parse the rm working dir correctly | 
|  void | testPasswordRegister()Test the reporter manager's register function when the reporter manager connects using a password | 
|  void | testPattern()Test the specified pattern to make sure it can parse out the string "inca" from a glob of text. | 
|  void | testProxy()Test the reporter manager's register function and proxy renewal info | 
|  void | testRegister()Test the reporter manager's register function | 
|  void | testRestart()Test the reporter manager's restart function. | 
|  void | testSendReporters()Test the ability to send reporters from a suite to a RM | 
|  void | testStage()Test the reporter manager's stage function which installs a reporter manager distribution on a remote resource. | 
|  void | testStart()Test the reporter manager's start function. | 
|  void | testStartOnSecondTime()Test the reporter manager's start function. | 
|  void | testStartStops()Test the reporter manager's start function. | 
|  void | testUpgrade()Test the reporter manager's stage function which installs a reporter manager distribution on a remote resource. | 
| Methods inherited from class junit.framework.TestCase | 
|---|
| countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString | 
| Methods inherited from class junit.framework.Assert | 
|---|
| assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public ReporterManagerControllerTest()
| Method Detail | 
|---|
public static java.net.ServerSocket createSSLSocket(int port)
                                             throws java.lang.Exception
port - The port to open the socket on.
java.lang.Exception - if unable to create ssl socket
public static edu.sdsc.inca.util.SuiteWrapper createSampleSuite(java.lang.String resource)
                                                         throws org.apache.xmlbeans.XmlException
resource - The name of a resource to schedule the suite to.
org.apache.xmlbeans.XmlException - if unable to parse sample suite
public ReporterManagerController createRM(boolean secure,
                                          boolean repository,
                                          edu.sdsc.inca.util.ResourcesWrapper resources,
                                          java.lang.String resource)
                                   throws java.lang.Exception
secure - Whether the mock agent server should be secure or notrepository - Whether or not we need to setup a temporary repositoryresources - The resources the agent should be configured withresource - The name of the resource in resources we should use to
                    start the reporter manager on.
java.lang.Exception - if trouble creating test reporter manager object
public void runCreateAndSubscribe(boolean auth)
                           throws java.lang.Exception
auth - whether to test with credentials or not
java.lang.Exception - if error during send of sample subscription
public void setUp()
           throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.Exception
public void startAndRegisterRMC(boolean secure,
                                boolean repository,
                                edu.sdsc.inca.util.ResourcesWrapper resources,
                                int numConnections,
                                java.lang.String resource)
                         throws java.lang.Exception
secure - Whether the mock agent server should be secure or notrepository - Whether or not we need to setup a temporary repositoryresources - The resources the agent should be configured withnumConnections - The number of connections the mock agent should
                       expect before exitting.resource - The name of the resource to start this reporter manager
                    on.
java.lang.Exception - If trouble starting up a remote reporter managers
public static java.util.Hashtable storeProxy(edu.sdsc.inca.util.ResourcesWrapper resources)
                                      throws java.lang.Exception
resources - A resources configuration containing a resource with
 MyProxy server configuration information.
java.lang.Exception - if trouble storing proxy
public void tearDown()
              throws java.lang.Exception
tearDown in class junit.framework.TestCasejava.lang.Exception
public void testCreateAndSuite()
                        throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testCreateAndSuiteAuth()
                            throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testGetUris()
                 throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testInterrupt()
                   throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testIsRemoteManagerAlive()
                              throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testManual()
                throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testPackage()
                 throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testParseWorkingDir()
                         throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testPasswordRegister()
                          throws java.lang.Exception
java.lang.Exception - if trouble executing testpublic void testPattern()
public void testProxy()
               throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testRegister()
                  throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testRestart()
                 throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testSendReporters()
                       throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testStage()
               throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testStart()
               throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testStartOnSecondTime()
                           throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testStartStops()
                    throws java.lang.Exception
java.lang.Exception - if trouble executing test
public void testUpgrade()
                 throws java.lang.Exception
java.lang.Exception - if trouble executing test| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||