Skip to content

Commit 01ee4ab

Browse files
authored
added feature toggles (#367)
1 parent efd8be3 commit 01ee4ab

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

src/main/java/software/amazon/cloudformation/AbstractWrapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ public void processRequest(final InputStream inputStream, final OutputStream out
267267
resourceHandlerRequest.setSnapshotRequested(request.getSnapshotRequested());
268268
resourceHandlerRequest.setRollback(request.getRollback());
269269
resourceHandlerRequest.setDriftable(request.getDriftable());
270+
resourceHandlerRequest.setFeatures(request.getFeatures());
270271
if (request.getRequestData() != null) {
271272
resourceHandlerRequest.setPreviousSystemTags(request.getRequestData().getPreviousSystemTags());
272273
}

src/main/java/software/amazon/cloudformation/proxy/HandlerRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
package software.amazon.cloudformation.proxy;
1616

17+
import java.util.Map;
1718
import lombok.Data;
1819
import lombok.NoArgsConstructor;
1920
import software.amazon.cloudformation.Action;
@@ -37,5 +38,6 @@ public class HandlerRequest<ResourceT, CallbackT> {
3738
private Boolean snapshotRequested;
3839
private Boolean rollback;
3940
private Boolean driftable;
41+
private Map<String, Object> features;
4042
private RequestContext<CallbackT> requestContext;
4143
}

src/main/java/software/amazon/cloudformation/proxy/ResourceHandlerRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public class ResourceHandlerRequest<T> {
4646
private Boolean snapshotRequested;
4747
private Boolean rollback;
4848
private Boolean driftable;
49+
private Map<String, Object> features;
4950
private String region;
5051
private String stackId;
5152
}

tests/test_codegen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ def test_generate_without_java_plugin_in_pom_should_not_fail(project):
177177

178178

179179
def test__get_plugin_version_invalid_pom(project):
180-
pom = open(project.root / "pom.xml", "w")
181-
pom.write("invalid pom")
182-
pom.close()
180+
with open(project.root / "pom.xml", "w") as pom:
181+
pom.write("invalid pom")
182+
pom.close()
183183
with pytest.raises(InvalidMavenPOMError):
184184
project._plugin._get_java_plugin_dependency_version(project)
185185

0 commit comments

Comments
 (0)