telefonicaid / lightweightm2m-iotagent

IoT Agent accepting COAP requests. Designed to be a bridge between the OMA Lightweight M2M protocol and the NGSI interface.
https://fiware-iotagent-lwm2m.rtfd.io/
GNU Affero General Public License v3.0
24 stars 30 forks source link

Failing test has been disabled due to request-shim-update #259

Open jason-fox opened 2 years ago

jason-fox commented 2 years ago

The following test has been disabled:

test/unit/ngsiv2/registration-test.js

+                    /*ngsiClient.getRegistrations('TestClient:Light', 'Light', undefined, function (
                        error,
                        response,
                        body
                    ) {
                        should.not.exist(error);
                        should.exist(body);
                        response.statusCode.should.equal(200);
-                        let registrations = JSON.parse(body);
-                        registrations.length.should.equal(0);
-                       done();
-                    });
+                        body.length.should.equal(0);*/
+                    done();
+                    /*});*/

The reasoning is as follows:

Because ngsiClient was calling an NGSI-v1 function, and after the switch to NGSI-v2 and got, it still doesn't work 😄

This is a test expectation using an HTTP request to check some things which assume the request was made by the obsolete request library - I guess it is the same situation as JSON body length thing.

Progress the request-shim refactoring the following workaround has been implemented: see https://github.com/telefonicaid/lightweightm2m-iotagent/pull/255#discussion_r773733283