In this case I want to see the message in case of failure.

Maybe the passif* family of functions could set a passif_pass class when
passing the test?


On Wed, Apr 23, 2014 at 1:40 PM, Ted Zlatanov <notifications@github.com>wrote:

> In tests/acceptance/01_vars/02_functions/network/selectservers.cf:
>
> > +  classes:
> > +      "up2servers"   expression => strcmp("$(test.retval)", "2");
> > +
> > +      "first_is_ok"  expression => isvariable("test.alive_servers[0]");
> > +      "second_is_ok" expression => isvariable("test.alive_servers[1]");
> > +      "third_is_bad"        not => isvariable("test.alive_servers[2]");
> > +      "fourth_is_bad"       not => isvariable("test.alive_servers[3]");
> > +
> > +  methods:
> > +      # All above classes must be set for test to pass
> > +      "" usebundle => dcs_passif_expected("up2servers,first_is_ok,second_is_ok,third_is_bad,fourth_is_bad",
> > +					  "", $(this.promise_filename)),
> > +          inherit => "true";
> > +
> > +  reports:
> > +    DEBUG::
>
> @jimis <https://github.com/jimis> I suggest to use EXTRA if the
> information is not specifically useful for tracing a failure. In other
> words, DEBUG is for when a test fails and you need to know why; EXTRA is
> for when you just want to know more about what the test did, regardless of
> failure. This is a new convention so please consider it, you don't have to
> use it if you don't want to.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/cfengine/core/pull/1646/files#r11896211>
> .
>