Neil- You should look at the tests/ directory in the source tree - there are plenty of examples of one bundle testing another :-)
What I hear you saying is that you want repeatable randomness - is that correct? If so, store your results in a file (possibly generated by a script in a different language) and use the contents of the file as your random number. -Dan On Jan 8, 2012, at 8:52 AM, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Re: Using dist for random selections > Author: neilhwatson > Link to topic: https://cfengine.com/forum/read.php?3,24500,24511#msg-24511 > > I've been experimenting with using one bundle as a testing bundle for > another. For example, the classic configuration file, process and command > promises that might make a service like NTP. Typically, one manually breaks > services to observe if Cfengine corrects it properly. Instead I'm writing > promises that break the service for me. In my testing environment I have > continually break and repair the service. > > Certain test conditions cannot exist at the same time. I cannot corrupt a > configuration file and delete it. One method is to randomly choose between > these to states. Flipping a coin. Dist appears to be usable but, as stated > in my original post, it is awkward and not mathematically fair. Randomint > was an alternative but, as the results show it randomizes at every iteration. > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine