mirror of
https://github.com/postgres/postgres.git
synced 2025-08-06 18:42:54 +03:00
Use a better way of skipping all subscription tests on Windows
This way we only need to specify the number of tests in one place, and the output is also less verbose.
This commit is contained in:
@@ -10,7 +10,16 @@ use strict;
|
||||
use warnings;
|
||||
use PostgresNode;
|
||||
use TestLib;
|
||||
use Test::More tests => 8;
|
||||
use Test::More;
|
||||
if ($windows_os)
|
||||
{
|
||||
plan skip_all => "authentication tests cannot run on Windows";
|
||||
}
|
||||
else
|
||||
{
|
||||
plan tests => 8;
|
||||
}
|
||||
|
||||
|
||||
# Delete pg_hba.conf from the given node, add a new entry to it
|
||||
# and then execute a reload to refresh it.
|
||||
@@ -40,10 +49,6 @@ sub test_role
|
||||
"authentication $status_string for method $method, role $role");
|
||||
}
|
||||
|
||||
SKIP:
|
||||
{
|
||||
skip "authentication tests cannot run on Windows", 12 if ($windows_os);
|
||||
|
||||
# Initialize master node
|
||||
my $node = get_new_node('master');
|
||||
$node->init;
|
||||
@@ -75,4 +80,3 @@ SKIP:
|
||||
reset_pg_hba($node, 'md5');
|
||||
test_role($node, 'scram_role', 'md5', 0);
|
||||
test_role($node, 'md5_role', 'md5', 0);
|
||||
}
|
||||
|
@@ -7,7 +7,15 @@ use strict;
|
||||
use warnings;
|
||||
use PostgresNode;
|
||||
use TestLib;
|
||||
use Test::More tests => 12;
|
||||
use Test::More;
|
||||
if ($windows_os)
|
||||
{
|
||||
plan skip_all => "authentication tests cannot run on Windows";
|
||||
}
|
||||
else
|
||||
{
|
||||
plan tests => 12;
|
||||
}
|
||||
|
||||
# Delete pg_hba.conf from the given node, add a new entry to it
|
||||
# and then execute a reload to refresh it.
|
||||
@@ -38,10 +46,6 @@ sub test_login
|
||||
"authentication $status_string for role $role with password $password");
|
||||
}
|
||||
|
||||
SKIP:
|
||||
{
|
||||
skip "authentication tests cannot run on Windows", 12 if ($windows_os);
|
||||
|
||||
# Initialize master node. Force UTF-8 encoding, so that we can use non-ASCII
|
||||
# characters in the passwords below.
|
||||
my $node = get_new_node('master');
|
||||
@@ -96,4 +100,3 @@ SKIP:
|
||||
test_login($node, 'saslpreptest7_role', "foo\xd8\xa71bar", 0);
|
||||
test_login($node, 'saslpreptest7_role', "foo1\xd8\xa7bar", 2);
|
||||
test_login($node, 'saslpreptest7_role', "foobar", 2);
|
||||
}
|
||||
|
Reference in New Issue
Block a user