|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase edu.sdsc.inca.AgentTest
public class AgentTest
Tester class for Agent. Other tests are in the AgentClientTest class.
Nested Class Summary | |
---|---|
static class |
AgentTest.MockDepot
A mockobject for the depot to that is used from the AgentClientTest. |
Field Summary | |
---|---|
static int |
HIGH_LEVEL
|
static int |
LOW_LEVEL
|
static java.lang.String |
REPOSITORY
|
static java.lang.String |
RESOURCES_FILE
|
static java.lang.String |
TEST_RESOURCE
|
Constructor Summary | |
---|---|
AgentTest()
|
Method Summary | |
---|---|
void |
createAgent(boolean auth,
boolean repository)
Start up the agent server |
static boolean |
hasGlobusServer()
Return true if there is a system property inca.test.globus indicating a GRAM and GridFTP server is available to test Globus related functionality |
static boolean |
hasMyProxyServer()
Return true if there is a system property inca.test.proxy indicating a MyProxy server is available to test proxy related functionality |
static boolean |
hasSshServer()
Return true if there is a system property inca.test.ssh indicating a SSH server is available to test SSH related functionality |
static boolean |
isRunningTest()
Return true if there is a sytem property inca.test=1 indicating to run the heavier duty agent tests |
void |
setUp()
Create a configuration for the agent and clean out the agent temporary files. |
void |
startReporterManager()
Start up a remote reporter manager and wait for it to register |
java.lang.String[] |
submitSuite(java.lang.String suitePath,
int numReports)
Submit a suite to the agent and configure a mock depot to receive the reports and return them |
void |
tearDown()
Cleanup the agent if it was started |
void |
testCheckReporterManagerStaging()
Tests the controller's checkReporterManagerStaging function. |
void |
testDeleteSuites()
Tests the controller's distributeSubcriptions function. |
void |
testDistributeSuites()
Tests the controller's distributeSubcriptions function. |
void |
testDistributeSuitesAuth()
Same as testDistributeSuites but with authentication |
void |
testRegister()
Test the register task |
void |
testRegisterAuth()
Test the register task |
void |
testRepositoriesPersistence()
Create a Agent object and configure it with a repositories file. |
void |
testResourceConfigPersistence()
1) Start up a fresh agent and check there are no resources configured 2) Save the sample resources to the tempdir and start a new agent and check the sample resources is available 3) Save a new blank resources file in the agent and check the timestamp r) Configure the agent with a password and set a new resources file to be saved with encryption and then read it back in and verify the resource is there. |
void |
testSuitePersistence()
Create an Agent object and save a suite. |
void |
testUpgradeResources()
Tests the controller's upgradeReporterManager function. |
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 |
Field Detail |
---|
public static final java.lang.String RESOURCES_FILE
public static final java.lang.String TEST_RESOURCE
public static final java.lang.String REPOSITORY
public static final int LOW_LEVEL
public static final int HIGH_LEVEL
Constructor Detail |
---|
public AgentTest()
Method Detail |
---|
public void createAgent(boolean auth, boolean repository) throws java.lang.Exception
auth
- Configure the agent with authenticationrepository
- Configure the agent with a temporary repository
java.lang.Exception
- if trouble creating new agent serverpublic static boolean isRunningTest()
public static boolean hasMyProxyServer()
public static boolean hasGlobusServer()
public static boolean hasSshServer()
public void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
public void startReporterManager() throws java.lang.InterruptedException
java.lang.InterruptedException
- if receives interruptpublic java.lang.String[] submitSuite(java.lang.String suitePath, int numReports) throws java.lang.Exception
suitePath
- The suite to submit to the agent.numReports
- The number of reports to have the mock depot receive
java.lang.Exception
- if trouble sending suite to agentpublic void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
public void testCheckReporterManagerStaging() throws java.lang.Exception
java.lang.Exception
- if problem running testpublic void testDeleteSuites() throws java.lang.Exception
java.lang.Exception
- if problem running testpublic void testDistributeSuites() throws java.lang.Exception
java.lang.Exception
- if problem running testpublic void testDistributeSuitesAuth() throws java.lang.Exception
java.lang.Exception
- if problem running testpublic void testRegisterAuth() throws java.lang.Exception
java.lang.Exception
- if problem running testpublic void testRegister() throws java.lang.Exception
java.lang.Exception
- if problem running testpublic void testRepositoriesPersistence() throws java.lang.Exception
java.lang.Exception
- if problem running testpublic void testResourceConfigPersistence() throws java.lang.Exception
java.lang.Exception
- if problem running testpublic void testSuitePersistence() throws java.lang.Exception
java.lang.Exception
- if problem running testpublic void testUpgradeResources() throws java.lang.Exception
java.lang.Exception
- if problem running test
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |