public abstract class AbstractAppDeployerIntegrationTests extends AbstractIntegrationTests
AppDeployer
implementations.
Inheritors should setup an environment with a newly created
AppDeployer
.
Tests in this class are independent and leave the
deployer in a clean state after they successfully run.
As deploying an application is often quite time consuming, some tests assert various aspects of deployment in a row, to avoid re-deploying apps over and over again.
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractAppDeployerIntegrationTests.AppDeployerWrapper
A decorator for AppDeployer that keeps track of deployed/undeployed apps.
|
AbstractIntegrationTests.Config
log, mavenProperties, name
Constructor and Description |
---|
AbstractAppDeployerIntegrationTests() |
Modifier and Type | Method and Description |
---|---|
protected AppDeployer |
appDeployer()
Subclasses should call this method to interact with the AppDeployer under test.
|
void |
cleanupLingeringApps() |
protected org.hamcrest.Matcher<String> |
hasStatusThat(org.hamcrest.Matcher<AppStatus> statusMatcher)
A Hamcrest Matcher that queries the deployment status for some app id.
|
protected abstract AppDeployer |
provideAppDeployer()
To be implemented by subclasses, which should return the instance of AppDeployer that needs
to be tested.
|
void |
testApplicationPropertiesPassing()
Tests that properties (key-value mappings) can be passed to a deployed app,
including values that typically require special handling.
|
void |
testCommandLineArgumentsPassing()
Tests that command line arguments (ordered strings) can be passed to a deployed app,
including values that typically require special handling.
|
void |
testDeployingStateCalculationAndCancel()
Tests that an app which takes a long time to deploy is correctly reported as deploying.
|
void |
testEnvironmentInfo()
Tests support for DeployerEnvironmentInfo is implemented.
|
void |
testFailedDeployment() |
void |
testMultipleInstancesDeploymentAndPartialState()
Tests support for instance count support and individual instance status report.
|
void |
testRedeploy()
An app deployer should be able to re-deploy an application after it has been un-deployed.
|
void |
testSimpleDeployment()
Tests a simple deploy-undeploy cycle.
|
void |
testUnknownDeployment() |
void |
wrapDeployer() |
deploymentTimeout, randomName, redeploymentPause, testApplication, undeploymentTimeout
protected abstract AppDeployer provideAppDeployer()
appDeployer()
, and not directly via a field or a call
to this method.protected AppDeployer appDeployer()
provideAppDeployer()
, that keeps
track of which apps have been deployed and undeployed.public void wrapDeployer()
public void cleanupLingeringApps()
public void testUnknownDeployment()
public void testSimpleDeployment()
public void testRedeploy()
public void testDeployingStateCalculationAndCancel()
public void testFailedDeployment()
public void testApplicationPropertiesPassing()
public void testCommandLineArgumentsPassing()
public void testMultipleInstancesDeploymentAndPartialState()
public void testEnvironmentInfo()
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.