public class ServerFactoryTest extends BaseTestCaseWithUser
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RUNNING_KERNEL |
static int |
TYPE_SERVER_NORMAL |
static int |
TYPE_SERVER_PROXY |
static int |
TYPE_SERVER_SATELLITE |
static int |
TYPE_SERVER_VIRTUAL |
user
Constructor and Description |
---|
ServerFactoryTest() |
Modifier and Type | Method and Description |
---|---|
void |
aTestChannels() |
void |
aTestServerHasSpecificEntitlement()
Test that server has a specific entitlement.
|
static Server |
createTestProxyServer(User owner,
boolean ensureOwnerAccess)
Creates a true proxy server by creating a test system, creating a base channel,
subscribing the system to that base channel, creating a child channel,
setting all the values of that child channel to make it a proxy channel,
and then activating the system as a proxy
|
static Server |
createTestServer(User owner)
Create a test Server and commit it to the DB.
|
static Server |
createTestServer(User owner,
boolean ensureOwnerAccess) |
static Server |
createTestServer(User owner,
boolean ensureOwnerAccess,
ServerGroupType type) |
static Server |
createTestServer(User owner,
boolean ensureOwnerAccess,
ServerGroupType type,
int stype) |
static Server |
createUnentitledTestServer(User owner,
boolean ensureOwnerAccess,
int stype,
java.util.Date dateCreated)
Create a test Server and commit it to the DB.
|
void |
setUp()
Called once per test method.
|
void |
testAddDeviceToServer() |
void |
testAddingDmiToServer() |
void |
testAddingRamToServer() |
void |
testAddNoteToServer() |
void |
testAddRemove() |
void |
testCompatibleWithServer() |
void |
testCreateServer() |
void |
testCustomDataValues() |
void |
testDeleteSnapshot() |
void |
testGetChildChannels() |
void |
testGetServerHistory() |
void |
testGetSnapshotTags() |
void |
testListAdministrators() |
void |
testListConfigEnabledSystems() |
void |
testListSnapshotsForServer() |
void |
testLookupSnapshotById() |
void |
testServerArchLookup() |
void |
testServerDoesNotHaveSpecificEntitlement()
Test that server does not have a specific entitlement.
|
void |
testServerGroupMembers() |
void |
testServerGroups()
Test editing a server group.
|
void |
testServerGroupType() |
void |
testServerLookup() |
void |
testSet() |
void |
testTwoServers()
Test making two Servers.
|
void |
testUnsubscribeFromAllChannels() |
commitHappened, tearDown
assertContains, assertContains, assertContains, assertNotBefore, assertNotBefore, assertNotEmpty, assertNotEmpty, assertPropertyEquals, clearSession, commitAndCloseSession, createDirIfNotExists, disableLocalizationServiceLogging, enableLocalizationServiceLogging, flushAndEvict, getNow, reload, reload
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
public static final int TYPE_SERVER_SATELLITE
public static final int TYPE_SERVER_PROXY
public static final int TYPE_SERVER_NORMAL
public static final int TYPE_SERVER_VIRTUAL
public static final java.lang.String RUNNING_KERNEL
public void setUp() throws java.lang.Exception
BaseTestCaseWithUser
setUp
in class BaseTestCaseWithUser
java.lang.Exception
- if an error occurs during setup.public void testListConfigEnabledSystems() throws java.lang.Exception
java.lang.Exception
public void testServerGroupMembers() throws java.lang.Exception
java.lang.Exception
public void aTestChannels() throws java.lang.Exception
java.lang.Exception
public void testCustomDataValues() throws java.lang.Exception
java.lang.Exception
public void testServerLookup()
public void testServerArchLookup()
public void testServerGroupType() throws java.lang.Exception
java.lang.Exception
public void testCreateServer() throws java.lang.Exception
java.lang.Exception
public void testServerGroups() throws java.lang.Exception
java.lang.Exception
- something bad happenedpublic void testAddRemove() throws java.lang.Exception
java.lang.Exception
public void testAddNoteToServer() throws java.lang.Exception
java.lang.Exception
public void testAddDeviceToServer() throws java.lang.Exception
java.lang.Exception
public void testAddingRamToServer() throws java.lang.Exception
java.lang.Exception
public void testAddingDmiToServer() throws java.lang.Exception
java.lang.Exception
public void testTwoServers() throws java.lang.Exception
java.lang.Exception
- something bad happenedpublic void testGetChildChannels() throws java.lang.Exception
java.lang.Exception
public void aTestServerHasSpecificEntitlement() throws java.lang.Exception
java.lang.Exception
- something bad happenedpublic void testServerDoesNotHaveSpecificEntitlement() throws java.lang.Exception
java.lang.Exception
- something bad happenedpublic static Server createTestServer(User owner) throws java.lang.Exception
owner
- the owner of this Serverjava.lang.Exception
- something bad happenedpublic static Server createTestServer(User owner, boolean ensureOwnerAccess, ServerGroupType type) throws java.lang.Exception
java.lang.Exception
public static Server createTestServer(User owner, boolean ensureOwnerAccess, ServerGroupType type, int stype) throws java.lang.Exception
java.lang.Exception
public static Server createUnentitledTestServer(User owner, boolean ensureOwnerAccess, int stype, java.util.Date dateCreated) throws java.lang.Exception
owner
- the owner of this ServerensureOwnerAccess
- this flag will make sure the owner passed in has
access to the new server.stype
- the server typedateCreated
- the create date for the serverjava.lang.Exception
- if there are server creation errorspublic static Server createTestServer(User owner, boolean ensureOwnerAccess) throws java.lang.Exception
java.lang.Exception
public void testCompatibleWithServer() throws java.lang.Exception
java.lang.Exception
public void testListAdministrators() throws java.lang.Exception
java.lang.Exception
public void testGetServerHistory() throws java.lang.Exception
java.lang.Exception
public static Server createTestProxyServer(User owner, boolean ensureOwnerAccess) throws java.lang.Exception
owner
- user that is creating the proxyensureOwnerAccess
- if set to true, a Server Group will be created for that
user and systemjava.lang.Exception
- something bad happenedpublic void testUnsubscribeFromAllChannels() throws java.lang.Exception
java.lang.Exception
public void testSet() throws java.lang.Exception
java.lang.Exception
public void testListSnapshotsForServer() throws java.lang.Exception
java.lang.Exception
public void testLookupSnapshotById() throws java.lang.Exception
java.lang.Exception
public void testDeleteSnapshot() throws java.lang.Exception
java.lang.Exception
public void testGetSnapshotTags() throws java.lang.Exception
java.lang.Exception