chiefy / vaulted

nodejs based wrapper for HashiCorp's Vault HTTP API
https://chiefy.github.io/vaulted
MIT License
47 stars 6 forks source link

Bump request-promise dependency. #80

Closed blimmer closed 8 years ago

kenjones-cisco commented 8 years ago

Travis did not show errors in the previous run, even thought it did not indicate the build failed. I have set travis to retry the build again to verify some things.

Based on the changes made to request-promise and that I'm already using that version in another project myself already, I'm actually surprised there were any errors.

blimmer commented 8 years ago

Since the build is re-running I couldn't see the previous output, but I wonder if it was the same set of results I was getting when trying to run tests locally.

  97 passing (1s)
  1 pending
  133 failing
kenjones-cisco commented 8 years ago

There were only 6 errors when run via travis.

kenjones-cisco commented 8 years ago

I'm pretty sure the root cause for the errors you that are now showing within travis:

  438 passing (7s)
  8 pending
  6 failing
  1) auth/tokens #revokeTokenPrefix should resolve after token prefix revoked:
     AssertionError: expected promise to be fulfilled but it was rejected with { Object (name, statusCode, ...) }

  2) pki #issueCertCredentials should resolve when all required and valid inputs provided:
     AssertionError: expected { Object (certificate, issuing_ca, ...) } to have a property 'serial_number'
      at tests/backends/pki.js:593:31
      at tryCatcher (node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (node_modules/bluebird/js/release/promise.js:497:31)
      at Promise._settlePromise (node_modules/bluebird/js/release/promise.js:555:18)
      at Promise._settlePromise0 (node_modules/bluebird/js/release/promise.js:600:10)
      at Promise._settlePromises (node_modules/bluebird/js/release/promise.js:683:18)
      at Async._drainQueue (node_modules/bluebird/js/release/async.js:125:16)
      at Async._drainQueues (node_modules/bluebird/js/release/async.js:135:10)
      at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/release/async.js:16:14)
  3) pki #getCertSerial should resolve when all required and valid inputs provided:
     Error: Endpoint requires an id.
      at Endpoint.validateId (lib/endpoint.js:9:1974)
      at Hooks.execPre (lib/hooks.js:9:755)
      at Endpoint.impl (lib/endpoint.js:9:8232)
      at Endpoint.wrapper [as get] (node_modules/lodash/index.js:3592:19)
      at Vaulted.getCertSerial (lib/backends/pki.js:9:4727)
      at Vaulted.tryCatcher (node_modules/bluebird/js/release/util.js:16:23)
      at Vaulted.getCertSerial (node_modules/bluebird/js/release/method.js:15:34)
      at Context.<anonymous> (tests/backends/pki.js:628:22)
  4) pki #revokeCertCredentials should resolve when all required and valid inputs provided:
     Error: Missing required input serial_number
      at lib/endpoint.js:9:3169
      at arrayEach (node_modules/lodash/index.js:1289:13)
      at Function.<anonymous> (node_modules/lodash/index.js:3345:13)
      at Endpoint.validateBody (lib/endpoint.js:9:2594)
      at Hooks.execPre (lib/hooks.js:9:755)
      at Endpoint.impl (lib/endpoint.js:9:8232)
      at Endpoint.wrapper [as post] (node_modules/lodash/index.js:3592:19)
      at Vaulted.revokeCertCredentials (lib/backends/pki.js:9:9788)
      at Vaulted.tryCatcher (node_modules/bluebird/js/release/util.js:16:23)
      at Vaulted.revokeCertCredentials (node_modules/bluebird/js/release/method.js:15:34)
      at Context.<anonymous> (tests/backends/pki.js:688:22)
  5) keys #updateRekey should resolve with instance of binded Vault - complete false:
     StatusCodeError: 400 - [object Object]
      at new StatusCodeError (node_modules/request-promise/lib/errors.js:26:15)
      at Request.RP$callback [as _callback] (node_modules/request-promise/lib/rp.js:68:32)
      at Request.self.callback (node_modules/request-promise/node_modules/request/request.js:199:22)
      at Request.<anonymous> (node_modules/request-promise/node_modules/request/request.js:1036:10)
      at IncomingMessage.<anonymous> (node_modules/request-promise/node_modules/request/request.js:963:12)
      at endReadableNT (_stream_readable.js:905:12)
  6) keys #updateRekey should resolve with instance of binded Vault - complete true:
     StatusCodeError: 400 - [object Object]
      at new StatusCodeError (node_modules/request-promise/lib/errors.js:26:15)
      at Request.RP$callback [as _callback] (node_modules/request-promise/lib/rp.js:68:32)
      at Request.self.callback (node_modules/request-promise/node_modules/request/request.js:199:22)
      at Request.<anonymous> (node_modules/request-promise/node_modules/request/request.js:1036:10)
      at IncomingMessage.<anonymous> (node_modules/request-promise/node_modules/request/request.js:963:12)
      at endReadableNT (_stream_readable.js:905:12)

Because the .travis.yml file does not specify a version for the vault and consul images, but takes latest. After the latest update to Vault came out I updated the images and provided tags for previous versions based on the corresponding Vault and Consul versions the image supported. But since the configuration files here have not be updated to look specifically at 0.4.1 it is pulling in version 0.5.0 and the changes to support the latest Vault version have not been completed and there was some breaking changes in that upgrade so our test cases will fail when running against 0.5.0 version of Vault.

blimmer commented 8 years ago

Ah, that makes sense. Thank you for the nudge. Defining the versions locally also fixed tests for me. Update coming. We'll need to make sure to specify the new tag in the feature branch for 0.5 if this gets merged.

blimmer commented 8 years ago

Looks like tests on travis passed after pegging the images.

kenjones-cisco commented 8 years ago

Thanks! :+1:

chiefy commented 8 years ago

thanks @blimmer :+1:

blimmer commented 8 years ago

No problem - thanks for the quick feedback. :100: