From 9fbdea695b70918b37dd42310bf6ba5a5240c67f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 1 Mar 2017 15:07:00 +0000 Subject: [PATCH] ruby: Simplify and fix regression test. This test failed on ppc64le with: Failure: was expected to be =~ <"wrong argument type Integer (expected Array)">. In addition the test generated a warning: tc_800_rhbz507346.rb:29: warning: ambiguous first argument; put parentheses or a space even after `/' operator This commit fixes both of these and also makes it simpler and faster by not bothering to launch the appliance. Fixes commit 227b1eea90713d190a9cf5463af106af0b4eee2c. --- ruby/t/tc_800_rhbz507346.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ruby/t/tc_800_rhbz507346.rb b/ruby/t/tc_800_rhbz507346.rb index b97681b50..89668d741 100644 --- a/ruby/t/tc_800_rhbz507346.rb +++ b/ruby/t/tc_800_rhbz507346.rb @@ -20,12 +20,10 @@ require File::join(File::dirname(__FILE__), 'test_helper') class Test800RHBZ507346 < MiniTest::Unit::TestCase def test_800_rhbz507346 g = Guestfs::Guestfs.new() - g.add_drive_scratch(10*1024*1024) - g.launch() - exception = assert_raises TypeError do - g.command(1) + g.parse_environment_list(1) end - assert_match /wrong argument type Fixnum \(expected Array\)/, exception.message + assert_match(/wrong argument type .* \(expected Array\)/, + exception.message) end end