[Libguestfs] [PATCH 2/2] ruby: tests: Give each test class and method a unique name.

Richard W.M. Jones rjones at redhat.com
Fri Jun 10 13:28:09 UTC 2016


On Fri, Jun 10, 2016 at 02:24:54PM +0100, Richard W.M. Jones wrote:
> On Fri, Jun 10, 2016 at 03:10:32PM +0200, Pino Toscano wrote:
> > In data martedì 7 giugno 2016 22:35:33, Richard W.M. Jones ha scritto:
> > > 'tc_410_close_event.rb' was not being run.  You could prove this by
> > > simply inserting "exit 1" into that test.
> > > 
> > > The reason is unclear, but by renaming every class and method in the
> > > tests to be unique, this ensures the tests are run.
> > > ---
> > 
> > ruby/t/tc_410_close_event.rb:  def test_events
> > ruby/t/tc_420_log_messages.rb:  def test_events
> > 
> > This explains: all the tests have TestLoad as class name, and these two
> > tests have the same method name.  IMHO renaming just the class names
> > should be enough,
> 
> I tried renaming just the methods, but that didn't seem to be
> sufficient to make the tests all run reliably, hence renaming
> the classes as well.

Sorry, I misunderstood.  Yes, renaming the classes only is
likely to be sufficient.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list