Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

envoy

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envoy - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

tests/init.js

2

package.json

@@ -9,3 +9,3 @@ {

],
"version": "0.0.4",
"version": "0.0.5",
"repository": {

@@ -12,0 +12,0 @@ "type": "git",

@@ -6,4 +6,7 @@ var assert = require('assert')

, envoy = require('../../lib/envoy')
, secrets = require(path.join('../',process.env.SECRETS_FILE))
, fixtures = require('../fixtures')
, config = require('../init')
, opts = config.opts
, uuid = config.uuid
, adapters = config.adapters
/*

@@ -51,3 +54,5 @@ * Sets up for a test

client.put(file.key, new Buffer(file.data), function(err) {
var key = path.join(uuid,file.key);
client.put(key, new Buffer(file.data), function(err) {

@@ -58,3 +63,3 @@ assert.equal(err, null, err);

client.get(file.key, function(err, getData) {
client.get(key, function(err, getData) {

@@ -66,7 +71,7 @@ assert.equal(err, null, err);

client.put(file.key, new Buffer(file.data + " modified"), function(err) {
client.put(key, new Buffer(file.data + " modified"), function(err) {
//console.log(" > Read");
client.get(file.key, function(err, getData) {
client.get(key, function(err, getData) {
assert.equal(err, null, err);

@@ -77,3 +82,3 @@ assert.equal(getData.toString(), file.data + " modified");

client.destroy(file.key, function(err, data) {
client.destroy(key, function(err, data) {
assert.equal(err, null, err);

@@ -88,9 +93,2 @@

};
}
, adapters = []
//Add to this array new adapters to test
, opts = {
memory: {}
, s3: secrets.s3
, ftp: secrets.ftp
};

@@ -97,0 +95,0 @@

@@ -5,30 +5,10 @@ var assert = require('assert')

, envoy = require('../lib/envoy.js')
, secrets = require(process.env.SECRETS_FILE)
, fixtures = require('./fixtures')
, undeployOpts
, adapters = []
//Add to this array new adapters to test
, opts = {
memory: {}
, s3: secrets.s3
, ftp: secrets.ftp
};
, config = require('./init')
, opts = config.opts
, uuid = config.uuid
, adapters = config.adapters
, undeployOpts;
_.each(opts, function (opts, adapter) {
adapters.push(adapter.toLowerCase());
});
//Load s3 configuration from travis if possible
if(process.env.TRAVIS_SECURE_ENV_VARS) {
_.extend(opts.s3,{
key: process.env.AWS_S3_KEY
, secret: process.env.AWS_S3_SECRET
, bucket: process.env.AWS_S3_BUCKET
, region: process.env.AWS_S3_REGION
});
}
_.each(adapters, function (adapterName) {
_.extend(opts[adapterName], {baseDir:'./tests'});

@@ -38,3 +18,3 @@ tests[adapterName + ' deploy/undeploy empty collection'] = function (next) {

assert.equal(err, null, err);
assert.deepEqual(log,['Adapter Opened','GET tests/.envoy','PUT tests/.envoy','Adapter Closed']);
assert.deepEqual(log,['Adapter Opened','GET '+uuid+'/.envoy','PUT '+uuid+'/.envoy','Adapter Closed']);

@@ -45,3 +25,3 @@ //Reverse the deployment to delete the site

assert.deepEqual(log,['Adapter Opened','GET tests/.envoy','PUT tests/.envoy','Adapter Closed']);
assert.deepEqual(log,['Adapter Opened','GET '+uuid+'/.envoy','PUT '+uuid+'/.envoy','Adapter Closed']);

@@ -57,3 +37,3 @@ next();

assert.equal(err, null, err);
assert.deepEqual(log,['Adapter Opened','GET tests/.envoy','PUT tests/.envoy',"PUT tests/siteroot/index.html",'Adapter Closed']);
assert.deepEqual(log,['Adapter Opened','GET '+uuid+'/.envoy','PUT '+uuid+'/.envoy','PUT '+uuid+'/siteroot/index.html','Adapter Closed']);

@@ -64,3 +44,3 @@ //Reverse the deployment to delete the site

assert.deepEqual(log,['Adapter Opened','GET tests/.envoy','PUT tests/.envoy',"DEL tests/siteroot/index.html",'Adapter Closed']);
assert.deepEqual(log,['Adapter Opened','GET '+uuid+'/.envoy','PUT '+uuid+'/.envoy','DEL '+uuid+'/siteroot/index.html','Adapter Closed']);

@@ -75,3 +55,3 @@ next();

assert.equal(err, null, err);
assert.deepEqual(log,['Adapter Opened','GET tests/.envoy','PUT tests/.envoy','Adapter Closed']);
assert.deepEqual(log,['Adapter Opened','GET '+uuid+'/.envoy','PUT '+uuid+'/.envoy','Adapter Closed']);

@@ -82,3 +62,3 @@ //Reverse the deployment to delete the site

assert.deepEqual(log,['Adapter Opened','GET tests/.envoy','PUT tests/.envoy','Adapter Closed']);
assert.deepEqual(log,['Adapter Opened','GET '+uuid+'/.envoy','PUT '+uuid+'/.envoy','Adapter Closed']);

@@ -97,3 +77,3 @@ next();

//need to sort as the order will be different on different systems/ftp servers
assert.deepEqual(log.sort(),['Adapter Opened','GET tests/.envoy','PUT tests/.envoy','PUT tests/kitten.jpeg','PUT tests/kitten.txt','Adapter Closed'].sort());
assert.deepEqual(log.sort(),['Adapter Opened','GET '+uuid+'/.envoy','PUT '+uuid+'/.envoy','PUT '+uuid+'/kitten.jpeg','PUT '+uuid+'/kitten.txt','Adapter Closed'].sort());

@@ -106,3 +86,3 @@ //Reverse the deployment to delete the site

assert.equal(log[log.length - 1],'Adapter Closed');
assert.deepEqual(log.sort(),['Adapter Opened','GET tests/.envoy','PUT tests/.envoy','DEL tests/kitten.jpeg','DEL tests/kitten.txt','Adapter Closed'].sort());
assert.deepEqual(log.sort(),['Adapter Opened','GET '+uuid+'/.envoy','PUT '+uuid+'/.envoy','DEL '+uuid+'/kitten.jpeg','DEL '+uuid+'/kitten.txt','Adapter Closed'].sort());

@@ -119,3 +99,3 @@ next();

assert.equal(log[log.length - 1],'Adapter Closed');
assert.deepEqual(log.sort(),['Adapter Opened','GET tests/.envoy','PUT tests/.envoy','PUT tests/a_subdirectory/kitten.txt','Adapter Closed'].sort());
assert.deepEqual(log.sort(),['Adapter Opened','GET '+uuid+'/.envoy','PUT '+uuid+'/.envoy','PUT '+uuid+'/a_subdirectory/kitten.txt','Adapter Closed'].sort());

@@ -128,3 +108,3 @@ //Reverse the deployment to delete the site

assert.equal(log[log.length - 1],'Adapter Closed');
assert.deepEqual(log.sort(),['Adapter Opened','GET tests/.envoy','PUT tests/.envoy','DEL tests/a_subdirectory/kitten.txt','Adapter Closed'].sort());
assert.deepEqual(log.sort(),['Adapter Opened','GET '+uuid+'/.envoy','PUT '+uuid+'/.envoy','DEL '+uuid+'/a_subdirectory/kitten.txt','Adapter Closed'].sort());

@@ -131,0 +111,0 @@ next();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc