Redmine/6119

On 09/10/2014 05:05 PM, Edward Welbourne wrote:
>
> In tests/acceptance/00_basics/03_bodies/cf_null_in_bundlesequence.cf:
>
> > @@ -0,0 +1,16 @@
> > +body common control {
> > +    bundlesequence => { "cf_null", "test" };
>
> If the user overtly includes "cf_null" in their bundle sequence, we 
> should not silently ignore it.
> By rights, we should expect that they have actually used this name for 
> a bundle.
> I would be happier if this were a test-case against one of the ways 
> that our bogus handling of empty strings can lead to a bogus "cf_null" 
> showing up in the bundlesequence, that we'd better not take seriously. 
> See my comment on the RedMine ticket. If there is (as I wish there 
> were) no plausible way to cause "cf_null" to show up in the list other 
> than overtly having it appear as a literal in the policy file, then we 
> should not filter it out; we should indeed expect to find a bundle 
> named cf_null.
> A test that treats it as an error to do so is, IMO, a bad test - it 
> tests that we're doing something profoundly wrong and calls that a 
> good thing, instead of acknowledging what's wrong with it and fixing 
> /that/ instead.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/cfengine/core/pull/1978/files#r17366404>.
>

I disagree - this is a reserved term. There are valid reasons for 
wanting a blank element in lists and patterns, e.g. if you want to 
include a variable element in a list which only applied in certain contexts

class1::

     var -> "mybundle"

class2::

    var -> "cf_null"

    bundlesequence => { "$(var)", "test" };

-- 
Founder and CTO at CFEngine
Author of In Search of Certainty: The Science of our Information 
Infrastructure <http://markburgess.org/certainty.html>