TritonDataCenter / node-manta

Node.js SDK for Manta
75 stars 54 forks source link

MPU tests are out of sync with Muskie master branch implementation #309

Closed jordanhendricks closed 7 years ago

jordanhendricks commented 7 years ago

In an earlier version of the MPU implementation in muskie, which was deployed as a feature branch image, only two possible states were returned from get-mpu: created and finalizing. This was inconsistent with the original design, which included a third state: done. The mmpu tool was integrated prior to the MPU changes in muskie's master branch, but the node-manta tests were not updated after muskie was changed to reflect the initial design. As a result, the mmpu tests and client tests that commit and abort uploads (then verify as such by doing an mpu-get) will fail with the incorrect state.

This results in errors that look like the following:

✖ commit upload

AssertionError: 'done' == 'finalizing'
    at Object.equal (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/nodeunit/lib/types.js:83:39)
    at /Users/jordan.hendricks/work/joyent-repos/node-manta/test/client.test.js:794:15
    at /Users/jordan.hendricks/work/joyent-repos/node-manta/lib/client.js:3546:17
    at parseResponse (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/restify-clients/lib/JsonClient.js:93:9)
    at IncomingMessage.done (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/restify-clients/lib/StringClient.js:207:13)
    at IncomingMessage.g (events.js:199:16)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

AssertionError
    at Object.equal (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/nodeunit/lib/types.js:83:39)
    at /Users/jordan.hendricks/work/joyent-repos/node-manta/test/client.test.js:795:15
    at /Users/jordan.hendricks/work/joyent-repos/node-manta/lib/client.js:3546:17
    at parseResponse (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/restify-clients/lib/JsonClient.js:93:9)
    at IncomingMessage.done (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/restify-clients/lib/StringClient.js:207:13)
    at IncomingMessage.g (events.js:199:16)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

✖ abort upload

AssertionError: 'done' == 'finalizing'
    at Object.equal (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/nodeunit/lib/types.js:83:39)
    at /Users/jordan.hendricks/work/joyent-repos/node-manta/test/client.test.js:837:19
    at /Users/jordan.hendricks/work/joyent-repos/node-manta/lib/client.js:3546:17
    at parseResponse (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/restify-clients/lib/JsonClient.js:93:9)
    at IncomingMessage.done (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/restify-clients/lib/StringClient.js:207:13)
    at IncomingMessage.g (events.js:199:16)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

AssertionError
    at Object.equal (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/nodeunit/lib/types.js:83:39)
    at /Users/jordan.hendricks/work/joyent-repos/node-manta/test/client.test.js:838:19
    at /Users/jordan.hendricks/work/joyent-repos/node-manta/lib/client.js:3546:17
    at parseResponse (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/restify-clients/lib/JsonClient.js:93:9)
    at IncomingMessage.done (/Users/jordan.hendricks/work/joyent-repos/node-manta/node_modules/restify-clients/lib/StringClient.js:207:13)
    at IncomingMessage.g (events.js:199:16)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

The tests need to be updated to match what is in muskie's master branch for MPU.

jordanhendricks commented 7 years ago

CR is at https://cr.joyent.us/#/c/1997.