Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/HTFeed/Storage/PairtreeObjectStore.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sub object_path {
my $self = shift;

return sprintf(
'%s/%s%s/',
'obj/%s/%s%s/',
$self->{namespace},
id2ppath($self->{objid}),
s2ppchars($self->{objid})
Expand Down
8 changes: 4 additions & 4 deletions t/collate.t
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ describe "HTFeed::Collate" => sub {

my $s3_timestamp = $s3_backup->[0][0];

ok($s3s{ptobj1}->s3_has("$pt_path/test.mets.xml"));
ok($s3s{ptobj1}->s3_has("$pt_path/test.zip"));
ok($s3s{ptobj2}->s3_has("$pt_path/test.mets.xml"));
ok($s3s{ptobj2}->s3_has("$pt_path/test.zip"));
ok($s3s{ptobj1}->s3_has("obj/$pt_path/test.mets.xml"));
ok($s3s{ptobj1}->s3_has("obj/$pt_path/test.zip"));
ok($s3s{ptobj2}->s3_has("obj/$pt_path/test.mets.xml"));
ok($s3s{ptobj2}->s3_has("obj/$pt_path/test.zip"));
ok($s3s{backup}->s3_has("test.test.$s3_timestamp.zip.gpg"));
ok($s3s{backup}->s3_has("test.test.$s3_timestamp.mets.xml"));

Expand Down
10 changes: 5 additions & 5 deletions t/storage_pairtree_object_store.t
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ describe "HTFeed::Storage::PairtreeObjectStore" => sub {
};

before all => sub {
$bucket_dir = "$vgw_home/$bucket";
$objdir = "$vgw_home/$bucket-obj";
$bucket_dir = "$vgw_home/$bucket/obj";
$objdir = "$vgw_home/$bucket-obj/obj";
make_path($objdir);
};

Expand All @@ -48,7 +48,7 @@ describe "HTFeed::Storage::PairtreeObjectStore" => sub {
it "includes the namespace, pairtree path, and pairtreeized object id" => sub {
my $storage = object_storage('test','ark:/123456/abcde');

is($storage->object_path, "test/pairtree_root/ar/k+/=1/23/45/6=/ab/cd/e/ark+=123456=abcde/");
is($storage->object_path, "obj/test/pairtree_root/ar/k+/=1/23/45/6=/ab/cd/e/ark+=123456=abcde/");
};
};

Expand All @@ -59,8 +59,8 @@ describe "HTFeed::Storage::PairtreeObjectStore" => sub {
$storage->move;

# should be in the bucket and also visible in the filesystem
ok($s3->s3_has("$pt_path/test.zip"));
ok($s3->s3_has("$pt_path/test.mets.xml"));
ok($s3->s3_has("obj/$pt_path/test.zip"));
ok($s3->s3_has("obj/$pt_path/test.mets.xml"));
ok(-s "$bucket_dir/$pt_path/test.zip");
ok(-s "$bucket_dir/$pt_path/test.mets.xml");
};
Expand Down