Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Add debuggee name to the re-register log message#154

Merged
DominicKramer merged 7 commits intogoogleapis:masterfrom
DominicKramer:master
Oct 6, 2016
Merged

Add debuggee name to the re-register log message#154
DominicKramer merged 7 commits intogoogleapis:masterfrom
DominicKramer:master

Conversation

@DominicKramer
Copy link
Copy Markdown
Contributor

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

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
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 3, 2016
@DominicKramer
Copy link
Copy Markdown
Contributor Author

@GoogleCloudPlatform/node-team PTAL

@matthewloring
Copy link
Copy Markdown
Contributor

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 init. Right now the test validates these using a hack to check for outgoing warnings and using the callback will be cleaner. Also, we want the test to show accurate usage of the api so that people who look there as a source of documentation will see the complete picture.

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.

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.

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.

@DominicKramer
Copy link
Copy Markdown
Contributor Author

@GoogleCloudPlatform/node-team PTAL

@matthewloring
Copy link
Copy Markdown
Contributor

LGTM

@DominicKramer DominicKramer merged commit 9f0e2fd into googleapis:master Oct 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No debugger available on App Engine flex

4 participants