IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 25, 2007, 1:50:34 PM (19 years ago)
Author:
jhoblitt
Message:

convert DataStore::FileSet to use URIs that end as /index.txt$ instead of /$

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataStore/t/06_fileset.t

    r8722 r15021  
    33# Copyright (C) 2006  Joshua Hoblitt
    44#
    5 # $Id: 06_fileset.t,v 1.8 2006-08-31 22:58:34 jhoblitt Exp $
     5# $Id: 06_fileset.t,v 1.9 2007-09-25 23:50:34 jhoblitt Exp $
    66
    77use strict;
     
    1010use lib qw( ./lib ./t );
    1111
    12 use Test::More tests => 18;
     12use Test::More tests => 19;
    1313
    1414=head1 NAME
     
    3333{
    3434    my $dsf = DataStore::FileSet->new(
    35         uri         => 'http://example.org/',
     35        uri         => 'http://example.org/index.txt',
    3636        fileset     => '12buckelyourshoe',
    3737        datetime    => '2042-01-01T00:00:00Z',
     
    4444eval {
    4545    my $dsf = DataStore::FileSet->new(
    46         uri         => 'http://example.org/',
     46        uri         => 'http://example.org/index.txt',
    4747        fileset     => '12buckelyourshoe',
    4848        datetime    => '2042-01-01T00:00:00Z',
     
    5757    my $dsf = DataStore::FileSet->new( uri => 'http://example.org' );
    5858};
    59 like($@, qr/is valid uri dirname/,
     59like($@, qr/uri ends with \/index.txt/,
    6060    '->new() fails when uri param does not end with /');
    6161
    6262eval {
    63     my $dsf = DataStore::FileSet->new( uri => '://example.org' );
     63    my $dsf = DataStore::FileSet->new( uri => 'http://example.org/index.html' );
     64};
     65like($@, qr/uri ends with \/index.txt/,
     66    '->new() fails when uri param does not end with /');
     67
     68eval {
     69    my $dsf = DataStore::FileSet->new( uri => '://example.org/index.txt' );
    6470};
    6571like($@, qr/is valid http uri/,
     
    105111    print $server->Start(), "\n";
    106112
    107     $server->RegisterURL('/', \&bar);
     113    $server->RegisterURL('/index.txt', \&bar);
    108114    $server->Process();  # Run forever
    109115
     
    116122{
    117123    my $dsp = DataStore::FileSet->new(
    118         uri         => "http://localhost:$port/",
     124        uri         => "http://localhost:$port/index.txt",
    119125        fileset     => '12buckelyourshoe',
    120126        datetime    => '2042-01-01T00:00:00Z',
     
    127133{
    128134    my $dsp = DataStore::FileSet->new(
    129         uri         => "http://localhost:$port/",
     135        uri         => "http://localhost:$port/index.txt",
    130136        fileset     => '12buckelyourshoe',
    131137        datetime    => '2042-01-01T00:00:00Z',
     
    154160eval {
    155161    my $dsf = DataStore::FileSet->new(
    156         uri         => 'http://example.org/',
     162        uri         => 'http://example.org/index.txt',
    157163        fileset     => '12buckelyourshoe',
    158164        datetime    => '2042-01-01T00:00:00Z',
Note: See TracChangeset for help on using the changeset viewer.