Skip to content

Commit 8399577

Browse files
committed
test case
1 parent 878221e commit 8399577

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

lib/Interactor/InteractorDaemonizer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,10 @@ InteractorDaemonizer.getOrSetConf = function(conf, infos, cb) {
350350
if (infos.machine_name)
351351
machine_name = infos.machine_name;
352352

353-
if (infos.info_node) {
353+
if (infos.info_node)
354354
info_node = infos.info_node;
355-
new_connection = true;
356-
}
355+
356+
new_connection = true;
357357
}
358358

359359
// 3# Override with environment variables (highest-priority conf)

test/interface/interactor.daemonizer.mocha.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,22 @@ describe('Daemonizer interactor', function() {
9696
return done();
9797
});
9898
});
99+
100+
it('should retrieve the same data with null fields', function(done) {
101+
interactorDaemonizer.getOrSetConf(default_conf, {
102+
secret_key : null,
103+
public_key : null,
104+
machine_name : null,
105+
info_node : null
106+
}, function(err, data) {
107+
should(err).be.null();
108+
data.secret_key.should.eql('XXXS2');
109+
data.public_key.should.eql('XXXP2');
110+
data.info_node.should.eql('test2.url');
111+
return done();
112+
});
113+
});
114+
99115
});
100116

101117
describe('Environment variable override', function() {

0 commit comments

Comments
 (0)