Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb14d973

Browse files
committed
Add a test for raftable list function.
1 parent831195d commitb14d973

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

‎contrib/raftable/t/000_basic.pl‎

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

44
use PostgresNode;
55
use TestLib;
6-
use Test::Moretests=>4;
6+
use Test::Moretests=>5;
77

88
subgenstr
99
{
@@ -79,7 +79,18 @@ sub start_nodes
7979
while (my ($key,$value) =each(%tests))
8080
{
8181
my$o =$baker->psql('postgres',"select raftable('$key');");
82-
is($o,$value,"Check that bakerhasall the state replicated");
82+
is($o,$value,"Bakerhas'$key'");
8383
}
8484

85+
my$ok = 1;
86+
my$o =$baker->psql('postgres',"select raftable();");
87+
while ($o =~/\((\w+),(\w+)\)/g)
88+
{
89+
if (!exists$tests{$1}) {$ok = 0;last; }
90+
my$val =delete$tests{$1};
91+
if ($valne$2) {$ok = 0;last; }
92+
}
93+
if (keys%tests > 0) {$ok = 0; }
94+
is($ok, 1,"Baker has everything");
95+
8596
exit(0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp