brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] brooklyn-server issue #589: yaml-test assertions: fix use of “matches”
Date Wed, 29 Mar 2017 10:26:45 GMT
Github user aledsage commented on the issue:
    @tbouron (cc @geomacy @neykov) agree, but I'm not sure from that what you think we should
support. There are a few nuances to your second point (about regex):
    * Use of regex is not just for advanced authors - a lot of people use simple regexes such
as `foo.*bar`.
    * The multiline support etc is language specific (e.g. see [1]). The use of `(?m)` and
`(?s)` are java-specific I believe [2,3], so not nice for YAML users to expect them to know
those. We'll need to document that, as Geoff says.
    * It feels (from my experience of using it) like there are two common use-cases for regex
matching: one is matching everything (i.e. normal regex); the second is the "containsMatch"
(e.g. using `TestSshCommand` to execute `ps aux` gives multiple line stdout, but a user is
only interested in checking if it contains a string (on a single-line) that matches my regex;
for that particular example some folk currently write `ps aux | grep -E ".*foo.*bar.*"` and
check the exit code, but if the command fails, you don't get shown the actual output of `ps
aux`, so some people end up executing `ps aux; ps aux | grep -E ".*foo.*bar.*"` to get around
    Based on that, do you agree with these changes? What do you think we should support?

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 or file a JIRA ticket
with INFRA.

View raw message