Skip to content

Commit

Permalink
Throw IllegalStateException during undeploy usecase
Browse files Browse the repository at this point in the history
 - When the app has not been deployed, the undeploy invocation should throw `IllegalStateException`.
 - Update the test case in `AbstractAppDeployerIntegrationTests` to have all the deployer implementations to conform

Resolves spring-cloud#185
  • Loading branch information
ilayaperumalg committed Feb 14, 2017
1 parent c292ca3 commit b219e65
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -113,6 +113,12 @@ public void testSimpleDeployment() {
appDeployer().undeploy(deploymentId);
assertThat(deploymentId, eventually(hasStatusThat(
Matchers.<AppStatus>hasProperty("state", is(unknown))), timeout.maxAttempts, timeout.pause));
try {
appDeployer().undeploy(deploymentId);
fail("Should have thrown an IllegalStateException");
}
catch (IllegalStateException ok) {
}
}

/**
Expand Down

0 comments on commit b219e65

Please sign in to comment.