1 # Copyright (c) 2010-2012 Zmanda, Inc. All Rights Reserved.
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # You should have received a copy of the GNU General Public License along
14 # with this program; if not, write to the Free Software Foundation, Inc.,
15 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
18 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
20 use Test::More tests => 6;
25 use lib '@amperldir@';
27 use Installcheck::ClientService;
31 Amanda::Debug::dbopen("installcheck");
32 Installcheck::log_test_output();
36 my ($got_options, $got_eof, $process_done);
41 $service->expect('main',
45 # note that this gets called four times, in arbitrary order
51 my ($exitstatus) = @_;
54 Amanda::MainLoop::quit();
57 $service = Installcheck::ClientService->new(
60 process_done => $process_done);
62 $service->close('main', 'w');
63 $service->expect('main',
64 [ re => qr/OPTIONS features=[0-9a-f]+;\n/, $got_options ]);
65 $service->expect('stream1', [ eof => $got_eof ]);
66 $service->expect('stream2', [ eof => $got_eof ]);
67 $service->expect('stream3', [ eof => $got_eof ]);
68 Amanda::MainLoop::run();