summaryrefslogtreecommitdiffstats
path: root/plugins/t/check_mysql.t
blob: ad423595fd2c34f5a9ccf17ce0c151653f4e043f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /usr/bin/perl -w -I ..
#
# MySQL Database Server Tests via check_mysql
#
# $Id$
#

use strict;
use Test;
use NPTest;

use vars qw($tests);

BEGIN {$tests = 2; plan tests => $tests}

my $t;

my $failureOutput = '/Access denied for user: /';

if ( -x "./check_mysql" )
{
  my $mysqlserver = getTestParameter( "mysql_server", "NP_MYSQL_SERVER", undef,
				      "A MySQL Server");

  $t += checkCmd( "./check_mysql -H $mysqlserver -P 3306", 2, $failureOutput );
}
else
{
  $t += skipMissingCmd( "./check_mysql", $tests );
}

exit(0) if defined($Test::Harness::VERSION);
exit($tests - $t);