Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/1066#discussion_r46172079
--- Diff:
usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/SimpleShellCommandTest.java
---
@@ -81,27 +68,35 @@
*/
@SetFromFlag("runDir")
ConfigKey<String> RUN_DIR = newConfigKey(String.class, "run.dir",
"directory where downloaded scripts should be run from");
+
+
+ /**
+ * If no assertions are configured in the test then the default is
this assertion that exit status of the command
+ * is zero (successful).
+ */
+ Map<String, Object> DEFAULT_ASSERTION =
ImmutableMap.<String,Object>of(TestFrameworkAssertions.EQUALS, 0);
+
/**
* Assertions on the exit code of the simple command.
*
* If not explicitly configured, the default assertion is a non-zero
exit code.
*/
@SetFromFlag("assertStatus")
- ConfigKey<Map> ASSERT_STATUS = ConfigKeys.newConfigKey(Map.class,
"assert.status",
- "Assertions on command exit code", Maps.newLinkedHashMap());
+ ConfigKey<Object> ASSERT_STATUS =
ConfigKeys.newConfigKey(Object.class, "assert.status", "Assertions on command
exit code",
+ new ArrayList<Map<String, Object>>());
--- End diff --
Again, it's good if config key default values are immutable. Same below.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---