Add debuggee name to the re-register log message#154
Add debuggee name to the re-register log message#154DominicKramer merged 7 commits intogoogleapis:masterfrom
Conversation
If an error occurs when re-registering a debuggee, the name of the debuggee is reported in the error message to aid in debugging why the re-registration failed. fixes googleapis#128
|
@GoogleCloudPlatform/node-team PTAL |
|
Could we update https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/blob/master/test/test-debugletapi.js to check the projectId passed in the callback to |
The debugletapi#init() method was updated to accept a callback of the form 'callback(err, project)' instead of 'callback(err)'. The test code for the class was updated so that callbacks now include the 'project' parameter.
| it('should acquire the project number during init', function(done) { | ||
| debugletapi.init('uid123', { warn: function() {} }, function(err) { | ||
| debugletapi.init('uid123', { warn: function() {} }, function(err, project) { | ||
| assert(!err); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
When the debugletapi.init() method calls its callback, the project ID reported in the callback should match the project ID stored in the debugletapi object.
| debugletapi.init('uid123', { warn: function() {} }, function(err) { | ||
| debugletapi.init('uid123', { warn: function() {} }, function(err, project) { | ||
| assert(!err); | ||
| assert.equal(debugletapi.project_, project); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
The testing of the debugletapi#init() method was updated so that the project name given through the callback was the project name expected.
Now the test for the debugletapi#init() method doesn't stub out the utils.getProjectNumber method because it is already being stubbed out earlier in the code.
The tests in teh test-debugletapi.js file assumed the GCLOUD_PROJECT environment variable was not set, and would fail if this assumption wasn't valid. Now the GCLOUD_PROJECT environment variable is unset when running this file.
| // But we keep on going. | ||
| } | ||
| callback(null); | ||
| callback(null, project); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@GoogleCloudPlatform/node-team PTAL |
|
LGTM |
If an error occurs when re-registering a debuggee, the name of
the debuggee is reported in the error message to aid in debugging
why the re-registration failed.
fixes #128