TritonDataCenter / TritonDataCenter/sdc-cloudapi
Machines resize tests failing on COAL
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8
- Forks
- 22
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
On my COAL instance, the dimensions are insufficient to pass a particular test:
not ok 462 should be equal
---
operator: equal
expected: 1
actual: 2
at: parseResponse (/opt/smartdc/cloudapi/node_modules/restify/lib/clients/json_client.js:91:9)
stack: |-
Error: should be equal
at Test.assert [as _assert] (/opt/smartdc/cloudapi/node_modules/tape/lib/test.js:228:54)
at Test.bound [as _assert] (/opt/smartdc/cloudapi/node_modules/tape/lib/test.js:80:32)
at Test.equal (/opt/smartdc/cloudapi/node_modules/tape/lib/test.js:389:10)
at Test.bound (/opt/smartdc/cloudapi/node_modules/tape/lib/test.js:80:32)
at /opt/smartdc/cloudapi/test/machines/resize.js:45:19
at parseResponse (/opt/smartdc/cloudapi/node_modules/restify/lib/clients/json_client.js:91:9)
at IncomingMessage.done (/opt/smartdc/cloudapi/node_modules/restify/lib/clients/string_client.js:167:13)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
...
The test is expected to fail due to server dimensions, except that in this case it's failing across two dimensions, not the expected one. In this case:
{ code: 'ValidationFailed',
message: 'Invalid VM update parameters',
errors:
[ { field: 'ram',
code: 'InsufficientCapacity',
message: 'Required additional RAM (10239744) exceeds the server\'s available RAM (-34953)' },
{ field: 'quota',
code: 'InsufficientCapacity',
message: 'Required additional disk (99990) exceeds the server\'s available disk (-1015)' } ] }
The quota error is expected. The RAM is not. It should handle the latter case gracefully too.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test/machines/resize.js, especially the assertion at line 45, and run the machines resize test on a COAL instance. Check how the test handles the ValidationFailed response when both RAM and quota report InsufficientCapacity; done means the expected quota limitation and the additional RAM limitation are handled without an unexpected test failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100