Created
December 11, 2014 21:43
-
-
Save mmcc/9d75cecd0ddfec88e5dc to your computer and use it in GitHub Desktop.
chain smoker example config
This file contains hidden or 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
var Suite = {}; | |
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min)) + min; | |
} | |
Suite.tests = [ | |
{ | |
name: 'Test Delivery', | |
address: 'http://www.example.com/accounts/'+ getRandomInt(100, 999) +'/subscriptions', | |
method: 'POST', | |
body: { | |
endpoint: this.callbackAddress, | |
events: ['herp', 'derp'] | |
}, | |
assertions: { | |
statusCode: 201 | |
}, | |
callback_assertions: { | |
job: { | |
state: 'finished' | |
} | |
} | |
}, | |
{ | |
name: 'Example get', | |
address: 'http://example.com', | |
assertions: { | |
statusCode: 200 | |
} | |
}, | |
{ | |
name: 'zc-create-job', | |
address: 'https://app.zencoder.com/api/v2/jobs', | |
method: 'POST', | |
external_id: function(body) { | |
return body.job.id; | |
}, | |
headers: { | |
'zencoder-api-key': '12345' | |
}, | |
body: { | |
input: 'http://s3.amazonaws.com/zencodertesting/test.mov', | |
notifications: 'https://25427b35.ngrok.com/callback/zc-create-job' | |
}, | |
assertions: { | |
statusCode: 201 | |
}, | |
callback_assertions: { | |
job: { | |
state: 'finished' | |
} | |
} | |
} | |
]; | |
module.exports = Suite; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment