Open marsell opened 3 years ago
Before:
[root@e5ad067e-ae5e-4505-933b-a31190be1489 (lab:cloudapi0) /opt/smartdc/cloudapi/test]# node users.test.js
[...]
not ok 197 should be equal
---
operator: equal
expected: 2
actual: 3
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/users.test.js:429:11
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)
...
[...]
not ok 381 should be equal
---
operator: equal
expected: 3
actual: 4
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/users.test.js:694:11
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)
...
[...]
# teardown
ok 744 teardown success
1..744
# tests 744
# pass 742
# fail 2
After:
[root@e5ad067e-ae5e-4505-933b-a31190be1489 (lab:cloudapi0) /opt/smartdc/cloudapi/test]# node users.test.js
[...]
# teardown
ok 745 teardown success
1..745
# tests 745
# pass 745
# ok
users.test.js used to create one policies for testing in tests/common.js, and one policy explicitly within users.test.js. At some point an additional policy was added to common.js, but checks in users.test.js were not updated.