3 my $domain = $ENV{MOG_TEST_DOMAIN} or die "MOG_TEST_DOMAIN not defined";
4 my $trackers = $ENV{MOG_TEST_TRACKERS} or die "MOG_TEST_TRACKERS not defined";
5 my @trackers = split(/,/, $trackers);
7 my $mogc = MogileFS::Client->new(hosts => \@trackers, domain=>$domain);
9 my $fh = $mogc->new_file("testkey", "");
10 ok($fh, "created new file handle");
11 for my $i (0..10000) { print $fh "$i\n" or die "failed to write $!\n" }
12 ok(close($fh), "closed file handle");
13 my $expect = $mogc->get_file_data("testkey");
16 $fh = $mogc->new_file("testlargekey", "", undef, { largefile => 1});
17 ok($fh, "created new largefile handle");
18 for my $i (0..10000) { print $fh "$i\n" or die "failed to write $!\n" }
19 ok(close($fh), "closed largefile handle");
20 my $actual = $mogc->get_file_data("testlargekey");
21 is($$actual, $$expect, "largefile PUT succeeded");