Class EnvironmentsControl
- java.lang.Object
-
- com.atlassian.bamboo.testutils.backdoor.BackdoorControl<EnvironmentsControl>
-
- com.atlassian.bamboo.testutils.backdoor.deployments.EnvironmentsControl
-
public class EnvironmentsControl extends BackdoorControl<EnvironmentsControl>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilter
-
-
Field Summary
Fields Modifier and Type Field Description static com.atlassian.pageobjects.elements.query.Poller.WaitTimeout
DEFAULT_DEPLOYMENT_WAIT_TIMEOUT
-
Fields inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
ADMIN_REST_PATH, API_REST_PATH, DEFAULT_REST_PATH, rootPath
-
-
Constructor Summary
Constructors Constructor Description EnvironmentsControl(@NotNull BambooEnvironmentData environmentData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnvironmentsControl
addEnvironment(TestDeploymentProjectDetails deploymentProject, Consumer<TestEnvironmentDetails.Builder> builderConsumer)
Consumer<TestEnvironmentDetails>
addEnvironment(String deploymentProjectId)
Save environmentConsumer<TestVariableDetails>
addEnvironmentVariable(TestEnvironmentDetails environment)
EnvironmentsControl
addEnvironmentVariable(TestEnvironmentDetails environment, Consumer<TestVariableDetails.Builder> builderConsumer)
EnvironmentsControl
addRequirement(long environmentId, String requirementKey)
EnvironmentsControl
assertDeploymentResults(String environmentId, org.hamcrest.Matcher<? super Iterable<RestDeploymentResult>> deploymentResultMatcher)
Verify that version is deployed on an environment.EnvironmentsControl
assertNeverDeployedOn(String environmentId)
Verify that version is not deployed on an environment.EnvironmentsControl
assertVersionDeployed(String environmentId, String versionName)
Verify that version is currently deployed on an environment.EnvironmentsControl
assertVersionInHistory(String environmentId, String versionName)
Verify that version was deployed on an environment.EnvironmentsControl
assertVersionNotDeployed(String environmentId, String versionName)
Verify that version is not deployed on an environment.EnvironmentsControl
assertVersionSuccessfullyDeployed(String environmentId, String versionName)
Verify that version is currently successfully deployed on an environment.RestDeploymentResultList
getDeploymentResultList(String environmentId)
RestDockerPipelineConfiguration
getDockerPipelineConfiguration(String environmentId)
List<RestRequirement>
getRequirements(Long environmentId)
protected com.sun.jersey.api.client.WebResource
resourceRoot(String url)
Creates a WebResource with authentication parameters set for the default user.RestQueuedDeployment
triggerDeployment(String environmentId, long versionId)
void
triggerDeploymentAndExpectFailure(String environmentId, long versionId, int expectedStatusCode)
EnvironmentsControl
waitForCompletedDeployment(String environmentId, String versionName)
Wait until version was deployed on environmentEnvironmentsControl
waitForCompletedDeployment(String environmentId, String versionName, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
Wait until version was deployed on environmentio.restassured.path.json.JsonPath
waitForDeploymentWithResponse(String environmentId, org.hamcrest.Matcher<io.restassured.path.json.JsonPath> matcher, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
Wait until matching deployment result appears for an environmentEnvironmentsControl
waitForFailedDeployment(String environmentId, String versionName)
Wait until version was deployed on environmentEnvironmentsControl
waitForInProgressDeployment(String environmentId, String versionName)
Wait until version was deployed on environmentEnvironmentsControl
waitForInProgressDeployment(String environmentId, String versionName, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
Wait until version was deployed on environmentEnvironmentsControl
waitForSuccessfulDeployment(String environmentId, String versionName)
Wait until version was deployed on environmentEnvironmentsControl
waitForSuccessfulDeploymentWithReason(String environmentId, String versionName, String reasonSummary)
Wait until version was deployed on environment with reason-
Methods inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
client, createResource, createResourceForPath, get, getEnvironmentData, getRestModulePath, percentEncode, ping, post, tearDown
-
-
-
-
Constructor Detail
-
EnvironmentsControl
public EnvironmentsControl(@NotNull @NotNull BambooEnvironmentData environmentData)
-
-
Method Detail
-
addEnvironment
public EnvironmentsControl addEnvironment(TestDeploymentProjectDetails deploymentProject, Consumer<TestEnvironmentDetails.Builder> builderConsumer)
-
addEnvironment
public Consumer<TestEnvironmentDetails> addEnvironment(String deploymentProjectId)
Save environment
-
addEnvironmentVariable
public EnvironmentsControl addEnvironmentVariable(TestEnvironmentDetails environment, Consumer<TestVariableDetails.Builder> builderConsumer)
-
addEnvironmentVariable
public Consumer<TestVariableDetails> addEnvironmentVariable(TestEnvironmentDetails environment)
-
getDockerPipelineConfiguration
public RestDockerPipelineConfiguration getDockerPipelineConfiguration(String environmentId)
-
waitForSuccessfulDeployment
public EnvironmentsControl waitForSuccessfulDeployment(String environmentId, String versionName)
Wait until version was deployed on environment
-
waitForFailedDeployment
public EnvironmentsControl waitForFailedDeployment(String environmentId, String versionName)
Wait until version was deployed on environment
-
waitForSuccessfulDeploymentWithReason
public EnvironmentsControl waitForSuccessfulDeploymentWithReason(String environmentId, String versionName, String reasonSummary)
Wait until version was deployed on environment with reason
-
waitForCompletedDeployment
public EnvironmentsControl waitForCompletedDeployment(String environmentId, String versionName)
Wait until version was deployed on environment
-
waitForCompletedDeployment
public EnvironmentsControl waitForCompletedDeployment(String environmentId, String versionName, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
Wait until version was deployed on environment
-
waitForInProgressDeployment
public EnvironmentsControl waitForInProgressDeployment(String environmentId, String versionName)
Wait until version was deployed on environment
-
waitForInProgressDeployment
public EnvironmentsControl waitForInProgressDeployment(String environmentId, String versionName, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
Wait until version was deployed on environment
-
waitForDeploymentWithResponse
public io.restassured.path.json.JsonPath waitForDeploymentWithResponse(String environmentId, org.hamcrest.Matcher<io.restassured.path.json.JsonPath> matcher, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
Wait until matching deployment result appears for an environment
-
assertVersionInHistory
public EnvironmentsControl assertVersionInHistory(String environmentId, String versionName)
Verify that version was deployed on an environment. Only first page of results is processed.
-
assertVersionSuccessfullyDeployed
public EnvironmentsControl assertVersionSuccessfullyDeployed(String environmentId, String versionName)
Verify that version is currently successfully deployed on an environment.
-
assertVersionDeployed
public EnvironmentsControl assertVersionDeployed(String environmentId, String versionName)
Verify that version is currently deployed on an environment.
-
assertVersionNotDeployed
public EnvironmentsControl assertVersionNotDeployed(String environmentId, String versionName)
Verify that version is not deployed on an environment. Only first page of results is processed
-
assertNeverDeployedOn
public EnvironmentsControl assertNeverDeployedOn(String environmentId)
Verify that version is not deployed on an environment. Only first page of results is processed
-
assertDeploymentResults
public EnvironmentsControl assertDeploymentResults(String environmentId, org.hamcrest.Matcher<? super Iterable<RestDeploymentResult>> deploymentResultMatcher)
Verify that version is deployed on an environment. Assumption is made that it will be listed on the first page of results.
-
addRequirement
public EnvironmentsControl addRequirement(long environmentId, String requirementKey)
-
getRequirements
public List<RestRequirement> getRequirements(Long environmentId)
-
triggerDeployment
public RestQueuedDeployment triggerDeployment(String environmentId, long versionId)
-
triggerDeploymentAndExpectFailure
public void triggerDeploymentAndExpectFailure(String environmentId, long versionId, int expectedStatusCode)
-
resourceRoot
protected com.sun.jersey.api.client.WebResource resourceRoot(String url)
Description copied from class:BackdoorControl
Creates a WebResource with authentication parameters set for the default user.- Overrides:
resourceRoot
in classBackdoorControl<EnvironmentsControl>
-
getDeploymentResultList
public RestDeploymentResultList getDeploymentResultList(String environmentId)
-
-