Skip to content
Browse files

move live tests to xt/

  • Loading branch information...
1 parent d5369ad commit 7441a38aadcadf67ed2f9f0f4772eb86dd548d62 @tokuhirom committed Feb 23, 2011
Showing with 10 additions and 6 deletions.
  1. +10 −6 t/01_command.t → xt/live/01_kt.t
View
16 t/01_command.t → xt/live/01_kt.t
@@ -5,25 +5,29 @@ use Test::Requires qw/File::Which Test::TCP/;
use Proc::Guard;
use IO::Socket::INET;
-my $memcached_bin = File::Which::which('memcached');
-plan skip_all => "This test requires memcached binary" unless $memcached_bin;
+my $ktserver_bin = File::Which::which('ktserver');
+plan skip_all => "This test requires ktserver binary" unless $ktserver_bin;
my $port = Test::TCP::empty_port();
my $pid;
{
- my $proc = proc_guard($memcached_bin, '-p', $port);
+ my $proc = proc_guard(
+ $ktserver_bin,
+ '-log' => File::Spec->devnull,
+ '-port' => $port
+ );
$pid = $proc->pid;
- ok $proc->pid, 'memcached: ' . $proc->pid;
+ ok $proc->pid, 'ktserver: ' . $proc->pid;
Test::TCP::wait_port($port);
my $sock = IO::Socket::INET->new(
PeerAddr => '127.0.0.1',
PeerPort => $port,
Proto => 'tcp',
) or die $!;
- print $sock "version\r\n";
+ print $sock "GET / HTTP/1.0\015\012\015\012";
my $version = <$sock>;
- like $version, qr/VERSION \d\.\d\.\d/;
+ like $version, qr{^HTTP/1.1 404 Not Found};
note $version;
}
is scalar(kill($pid)), 0, 'already killed';

0 comments on commit 7441a38

Please sign in to comment.
Something went wrong with that request. Please try again.