App-MtAws
view release on metacpan or search on metacpan
t/unit/glacier/inventory_csv.t view on Meta::CPAN
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use warnings;
use Test::More tests => 805;
use Test::Deep;
use Carp;
use FindBin;
use Scalar::Util qw/weaken/;
use lib map { "$FindBin::RealBin/../$_" } qw{../lib ../../lib};
use TestUtils 'w_fatal';
use App::MtAws::Glacier::Inventory::CSV;
use Data::Dumper;
sub test_full_file
t/unit/glacier/inventory_json.t view on Meta::CPAN
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use warnings;
use Test::More tests => 5;
use Test::Deep;
use Carp;
use FindBin;
use Scalar::Util qw/weaken/;
use lib map { "$FindBin::RealBin/../$_" } qw{../lib ../../lib};
use TestUtils 'w_fatal';
use App::MtAws::Glacier::Inventory::JSON;
use Data::Dumper;
t/unit/glacier/inventory_json.t view on Meta::CPAN
my $obj;
my $sample_r;
{
my $sample1 = <<'END';
{"VaultARN":"arn:aws:glacier:us-east-1:999966667777:vaults/test1","InventoryDate":"2013-11-06T02:51:29Z","ArchiveList":[
{"ArchiveId":"someid","ArchiveDescription":"somedescr","CreationDate":"somedate","Size":25000000,"SHA256TreeHash":"somehash"}
]}
END
$sample_r = \$sample1;
$obj = App::MtAws::Glacier::Inventory::JSON->new($sample1);
weaken($sample_r);
ok defined $sample_r;
my $data = $obj->get_archives();
is $data->[0]{ArchiveDescription}, "somedescr";
}
ok !defined $sample_r, "should save memory";
}
( run in 0.265 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )