Skip to content

Commit 53bb8ae

Browse files
committed
Switch to the new TAP tests API.
1 parent 7f97a12 commit 53bb8ae

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

contrib/raftable/t/000_basic.pl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use PostgresNode;
55
use TestLib;
6-
use Test::More tests => 5;
6+
use Test::More tests => 10;
77

88
sub genstr
99
{
@@ -80,19 +80,21 @@ sub start_nodes
8080
sleep(5);
8181
while (my ($key, $value) = each(%tests))
8282
{
83-
my $o = $baker->psql('postgres', "select raftable('$key');");
84-
is($o, $value, "Baker has '$key'");
83+
my ($rc, $stdout, $stderr) = $baker->psql('postgres', "select raftable('$key');");
84+
is($rc, 0, "Baker returns '$key'");
85+
is($stdout, $value, "Baker has the proper value for '$key'");
8586
}
8687

8788
my $ok = 1;
88-
my $o = $baker->psql('postgres', "select raftable();");
89-
while ($o =~ /\((\w+),(\w+)\)/g)
89+
my ($rc, $stdout, $stderr) = $baker->psql('postgres', "select raftable();");
90+
is($rc, 0, "Baker returns everything");
91+
while ($stdout =~ /\((\w+),(\w+)\)/g)
9092
{
9193
if (!exists $tests{$1}) { $ok = 0; last; }
9294
my $val = delete $tests{$1};
9395
if ($val ne $2) { $ok = 0; last; }
9496
}
9597
if (keys %tests > 0) { $ok = 0; }
96-
is($ok, 1, "Baker has everything");
98+
is($ok, 1, "Baker has the proper value for everything");
9799

98100
exit(0);

0 commit comments

Comments
 (0)