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.
pull/18/merge
Andrew Dunstan 8 years ago
parent d99d58cdc8
commit 8d9f060977
  1. 16
      src/test/authentication/t/001_password.pl
  2. 15
      src/test/authentication/t/002_saslprep.pl

@ -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);
}

Loading…
Cancel
Save