Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b51a5b1660
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 34 lines (21 sloc) 0.713 kb
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/env perl
use strict;
use warnings;
use Test::More;
use LWP::UserAgent;

BEGIN { use_ok 't::TestUtils' }

subtest 'get test tcp as groonga server' => sub {

    my $grn = t::TestUtils->create_test_grn_with_20articles;

    isa_ok($grn, 'Test::TCP');

    my $ua = LWP::UserAgent->new();
    
    my $res = $ua->get("http://127.0.0.1:@{[ $grn->port ]}/d/status");
    is $res->code, 200;
    diag $res->content;

    $res = $ua->get("http://127.0.0.1:@{[ $grn->port ]}/d/column_list?table=Article");
    is $res->code, 200;
    diag $res->content;
 
    $res = $ua->get("http://127.0.0.1:@{[ $grn->port ]}/d/select?table=Article");
    is $res->code, 200;
    diag $res->content;
   
};



done_testing;
Something went wrong with that request. Please try again.