<commit_before>// --------------------------------------------------------------------------------------------------------------------
//
// integration/amazon-glacier.js - integration tests for Amazon Storage Gateway
//
// Copyright (c) 2012 AppsAttic Ltd - http://www.appsattic.com/
// Written by <NAME> <<EMAIL>>
//
// License: http://opensource.org/licenses/MIT
//
// --------------------------------------------------------------------------------------------------------------------
// requires

var fs = require('fs');
var test = require('tap').test;
var awssum = require('../../');
var amazon = awssum.load('amazon/amazon');
var Glacier = awssum.load('amazon/glacier').Glacier;
var inspect = require('eyes').inspector();

// --------------------------------------------------------------------------------------------------------------------

var env = process.env;
var glacier;
try {
    glacier = new Glacier({
        'accessKeyId'     : env.ACCESS_KEY_ID,
        'secretAccessKey' : env.SECRET_ACCESS_KEY,
        'awsAccountId'    : env.AWS_ACCOUNT_ID,
        'region'          : amazon.US_EAST_1
    });
}
catch(e) {
    // env vars aren't set, so skip these integration tests
    process.exit();
}

// --------------------------------------------------------------------------------------------------------------------
// Amazon:Glacier operations

// just check one request, checks the signature to be honest
test('Glacier:ListVaults - (1) Standard', function(t) {
    var opts = {};
    glacier.ListVaults(function(err, data) {
        t.notOk(err, 'Glacier:ListVaults - standard : no error');
        t.ok(data, 'Glacier:ListVaults - standard : result ok');
        t.end();
    });
});

// --------------------------------------------------------------------------------------------------------------------<commit_msg>Access no longer exists for Glacier<commit_after>// --------------------------------------------------------------------------------------------------------------------
//
// integration/amazon-glacier.js - integration tests for Amazon Storage Gateway
//
// Copyright (c) 2012 AppsAttic Ltd - http://www.appsattic.com/
// Written by <NAME> <<EMAIL>>
//
// License: http://opensource.org/licenses/MIT
//
// --------------------------------------------------------------------------------------------------------------------
// requires

var fs = require('fs');
var test = require('tap').test;
var awssum = require('../../');
var amazon = awssum.load('amazon/amazon');
var Glacier = awssum.load('amazon/glacier').Glacier;
var inspect = require('eyes').inspector();

// --------------------------------------------------------------------------------------------------------------------

var env = process.env;
var glacier;
try {
    glacier = new Glacier({
        'accessKeyId'     : env.ACCESS_KEY_ID,
        'secretAccessKey' : env.SECRET_ACCESS_KEY,
        'awsAccountId'    : env.AWS_ACCOUNT_ID,
        'region'          : amazon.US_EAST_1
    });
}
catch(e) {
    // env vars aren't set, so skip these integration tests
    process.exit();
}

// --------------------------------------------------------------------------------------------------------------------
// Amazon:Glacier operations

// just check one request, checks the signature to be honest
test('Glacier:ListVaults - (1) Standard', function(t) {
    var opts = {};
    glacier.ListVaults(function(err, data) {
        t.ok(err, 'Glacier:ListVaults - standard : no error');
        t.equal(err.Body.code, 'AccessDeniedException', 'Glacier:ListVaults - standard : no error');
        t.notOk(data, 'Glacier:ListVaults - standard : result ok');
        t.end();
    });
});

// --------------------------------------------------------------------------------------------------------------------
{'fraction_non_alphanumeric': 0.4185740594580374, 'fraction_numerical': 0.0031570639305445935, 'mean_word_length': 1.061822125813449, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4368988', 'n_tokens_mistral': 935, 'n_tokens_neox': 916, 'n_words': 207}