Skip to content

Commit

Permalink
Merge pull request #96 from wikimedia/fix_test
Browse files Browse the repository at this point in the history
Fix tests for new preq retry defaults
  • Loading branch information
Pchelolo committed Jan 25, 2019
2 parents 4c919a1 + daa0afa commit d432128
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
node_js:
- "4"
- "6"
- "10"
- "node"

sudo: false
Expand Down
5 changes: 4 additions & 1 deletion test/handlerTemplate/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ describe('Handler Template', function() {
var api = nock('http://mocked_domain_for_tests.com')
.get('/TestTitle').reply(500, 'SERVER_ERROR', { 'Content-Type': 'text/plain' });

return preq.get({ uri: server.hostPort + '/service/return_if_test/TestTitle' })
return preq.get({
uri: server.hostPort + '/service/return_if_test/TestTitle',
retries: 0
})
.then(function () {
throw new Error('Error should be thrown');
}, function(e) {
Expand Down
1 change: 1 addition & 0 deletions test/handlerTemplate/test_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ spec_root: &spec_root
- get_from_api:
request:
uri: http://mocked_domain_for_tests.com/{title}
retries: 0
return_if:
status: '2xx'
catch:
Expand Down

0 comments on commit d432128

Please sign in to comment.