Github user geomacy commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/1066#discussion_r45844605
--- Diff:
usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/SimpleShellCommandTest.java
---
@@ -87,21 +90,24 @@
* 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<List<Map<String, Object>>> ASSERT_STATUS =
ConfigKeys.newConfigKey(
--- End diff --
This change doesn't alter the syntax of the assertions in the Yaml, (except
for the new SimpleShellCommand which it just brings in to line with the other
tests), i.e.
```
assert:
- equals: true
```
But in fact any tests that were written before the new test assertions
class were put in wouldn't work now (actually since
https://github.com/apache/incubator-brooklyn/pull/1049) as they read
```
assert:
equals: true
```
However I think there are very few such tests, as people had only started
using the framework when 1049 was done.
At the same time it does seem a good improvement to make it work with a
single map and wrap that in a list if need be. (Is there code already
somewhere that does that sort of thing? How can you have a config key that
might be a map or might be a list?)
---
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.
---