Skip to content

Commit 053de2b

Browse files
committed
add comment for the test
1 parent fe2bb6a commit 053de2b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/models/events/docker.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ DockerEvents.prototype.handleDie = function (data) {
117117
debug('handleDie', arguments);
118118
// this api is closing and will not handle any new events.
119119
if (this.closeHandler) {
120+
// this debug statement is covered with unit test. Don't change/remove it.
121+
// see unit/docker-events.js
120122
return debug('events are stopping');
121123
}
122124
var self = this;
@@ -131,7 +133,11 @@ DockerEvents.prototype.handleDie = function (data) {
131133
var containerId = data.id;
132134
activeApi.isMe(function (err, meIsActiveApi) {
133135
if (err) { return logErr(err); }
134-
if (!meIsActiveApi) { return debug('not active api'); }
136+
if (!meIsActiveApi) {
137+
// this debug statement is covered with unit test. Don't change/remove it.
138+
// see unit/docker-events.js
139+
return debug('not active api');
140+
}
135141
self.getEventLock(data.uuid, function (err, eventMutex) {
136142
if (err) { return logErr(err); }
137143
var userStoppedContainer = new UserStoppedContainer(containerId);

0 commit comments

Comments
 (0)