#!/usr/bin/perl

# Copryight (C) 2004-2005  Joshua Hoblitt
#
# $Id: 10_server_is_valid_volume_name.t,v 1.5 2008-03-20 21:10:14 jhoblitt Exp $

use strict;
use warnings FATAL => qw( all );

use Test::More tests => 3;

use lib qw( ./t ./lib );

use Nebulous::Server;
use Test::Nebulous;

my $neb = Nebulous::Server->new(
    dsn         => $NEB_DB,
    dbuser      => $NEB_USER,
    dbpasswd    => $NEB_PASS,
);

Test::Nebulous->setup;

ok($neb->_is_valid_volume_name('node01'), "valid volume name");

Test::Nebulous->setup;

ok($neb->_is_valid_volume_name('node02'), "valid volume name");

Test::Nebulous->setup;

is($neb->_is_valid_volume_name('node99'), undef, "invalid volume name");

Test::Nebulous->cleanup;
