Skip to content

Commit

Permalink
small impact suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelM3 committed Jun 27, 2023
1 parent bb3f154 commit 184f6b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

- Allow access entities using NGSIv2 API for non_signal rules (#549)
- Allow access entities using NGSIv2 API for non_signal rules (new setting nonSignalByAPI / PERSEO_CHECK_NON_SIGNAL_BY_API) (#549)

6 changes: 3 additions & 3 deletions lib/models/entitiesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var async = require('async'),
myutils = require('../myutils'),
constants = require('../constants'),
logger = require('logops'),
NGSI = require('ngsijs');
ngsi = require('ngsijs');

function orionServiceDb(service) {
return appContext.OrionDb(config.orionDb.prefix + '-' + service);
Expand Down Expand Up @@ -61,7 +61,7 @@ function findSilentEntitiesByAPI(service, subservice, ruleData, func, callback)
options.headers[constants.REALIP_HEADER] = domain.context.from;
}
}
var connection = new NGSI.Connection(config.orion.URL, options);
var connection = new ngsi.Connection(config.orion.URL, options);

var filter = {
service: service,
Expand All @@ -74,7 +74,7 @@ function findSilentEntitiesByAPI(service, subservice, ruleData, func, callback)
} else if (ruleData.idRegexp) {
filter.idPattern = ruleData.idRegexp;
}
logger.debug(
logger.info(
context,
'find silent entities by API ngsi using options %j and filter %j and rule %j',
options,
Expand Down
4 changes: 2 additions & 2 deletions test/unit/entitiesStore_utest.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var chai = require('chai');
var sinon = require('sinon');
var sinonChai = require('sinon-chai');
var config = require('../../config.js');
var NGSI = require('ngsijs');
var ngsi = require('ngsijs');
chai.Should();
chai.use(sinonChai);

Expand All @@ -42,7 +42,7 @@ describe('entitiesStore', function() {
var listEntitiesMock;

beforeEach(function() {
connectionMock = sinon.stub(NGSI, 'Connection');
connectionMock = sinon.stub(ngsi, 'Connection');
listEntitiesMock = sinon.stub();

// Mock the Connection function
Expand Down

0 comments on commit 184f6b7

Please sign in to comment.