Skip to content

Commit

Permalink
restore
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiaMarzano-Eng committed Oct 5, 2021
1 parent 65f6c7e commit dc251e0
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,43 +448,6 @@ describe('Test Iot Agent lib', function() {
});
});

describe('Get Speed', function() {
it('verify speed', function(done) {
this.timeout(0);
var speedRequest2 = {
url:
'http://' +
properties.get('context-broker-host') +
':' +
properties.get('context-broker-port') +
'/v2/entities/' +
properties.get('entity-id') +
'/attrs/Speed',
method: 'GET',
headers: {
'fiware-service': config.service,
'fiware-servicepath': config.subservice
}
};

function myTimer() {
request.get(speedRequest2, function(error, response, body) {
console.log('speedRequest');
loggerTest.info(logContextTest, 'RESPONSE speedRequest2=' + JSON.stringify(response));

if (error == null) {
loggerTest.info(logContextTest, 'REST - speed check');
done();
} else {
loggerTest.info(logContextTest, 'REST - speed check');
done(new Error('REST - speed check'));
}
});
}
myTimer();
});
});

describe('Add Device', function() {
it('verify the addition of a new device', function(done) {
this.timeout(0);
Expand Down Expand Up @@ -711,6 +674,43 @@ describe('Verify Northbound flow', function() {
});
});

describe('Get Speed', function() {
it('verify speed', function(done) {
this.timeout(0);
var speedRequest2 = {
url:
'http://' +
properties.get('context-broker-host') +
':' +
properties.get('context-broker-port') +
'/v2/entities/' +
properties.get('entity-id') +
'/attrs/Speed',
method: 'GET',
headers: {
'fiware-service': config.service,
'fiware-servicepath': config.subservice
}
};

function myTimer() {
request.get(speedRequest2, function(error, response, body) {
console.log('speedRequest');
loggerTest.info(logContextTest, 'RESPONSE speedRequest2=' + JSON.stringify(response));

if (error == null) {
loggerTest.info(logContextTest, 'REST - speed check');
done();
} else {
loggerTest.info(logContextTest, 'REST - speed check');
done(new Error('REST - speed check'));
}
});
}
myTimer();
});
});

describe('Verify ADMIN API services', function() {
it('verify version service', function(done) {
this.timeout(0);
Expand Down

0 comments on commit dc251e0

Please sign in to comment.