Created
March 6, 2014 19:00
-
-
Save Jonahss/9396938 to your computer and use it in GitHub Desktop.
MultipleTunnelTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this runs two named tunnels with DIFFERENT names, second one fails immediately. | |
//OUTPUT: | |
//>> tunnel1 started with status false | |
//>> tunnel0 started with status true | |
//** this gist automatically uploaded with the gist-it package on the Atom editor. Boo-ya! | |
SauceTunnel = require('sauce-tunnel'); | |
var username = process.env.SAUCE_USERNAME; | |
var key = process.env.SAUCE_ACCESS_KEY; | |
var names = ['tunnel0', 'tunnel1'] | |
var startCb = function(status){ | |
console.log(this.identifier, 'started with status', status); | |
} | |
var tunnels = names.map(function(name){ | |
var tunn = new SauceTunnel(username, key, name, true); | |
var cb = startCb.bind(tunn); | |
tunn.start(cb); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment