Annotation of HOPE/Net-OpenAMD/t/local_server.t, Revision 1.3
1.1 andrew 1: #!perl
1.3 ! andrew 2: # $AFresh1: local_server.t,v 1.2 2010/06/26 14:02:31 andrew Exp $
1.1 andrew 3: use Test::More;# tests => 75;
4:
5: use strict;
6: use warnings;
7:
8: #use File::Temp qw/ tempdir /;
9: #use File::Copy qw/ cp /;
10: #use File::Spec;
11:
12: my $have_test_json = 1;
13:
14: BEGIN {
1.2 andrew 15: use FindBin;
1.3 ! andrew 16: use lib "$FindBin::Bin/../../../mojo/lib";
1.2 andrew 17:
1.1 andrew 18: eval "use Test::Mojo::Server";
19: plan skip_all => "Test::Mojo::Server required for testing local server" if $@;
20: }
21:
22: my $server = Test::Mojo::Server->new();
23: $server->executable('test_server.pl');
24: #$server = $server->command('perl t/test_server.pl');
25:
26: my $path = $server->find_executable_ok('executable found');
27: #print "PATH: $path\n";
28: #my $port = $server->generate_port_ok('port test');
29:
30: my $port = $server->start_daemon_ok('daemon test');
31: print "Port: $port\n";
32:
33: $server->server_ok('server running');
34:
35: my $pid = $server->pid;
36: print "PID: $pid\n";
37:
38: $server->stop_server_ok('server stopped');
39:
40:
41:
42: done_testing();
43: exit;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>