NikhilM98 / sugarizer-school-portal-server

Sugarizer School Portal Server manages Kubernetes cluster to provide on-demand Sugarizer Server instances.
https://sugarizer.org
Apache License 2.0
3 stars 6 forks source link

Test cases fail #33

Closed ricknjacky closed 3 years ago

ricknjacky commented 3 years ago

Validator library was integrated in commit :- 1446514bca7947864ae40a463d52bde4de5a904a

In yesterday's weekly meeting with my mentors, I discussed this issue and the cause of this. the test cases fail because:-

FATAL ERROR, uncaught exception 'Cannot read property 'deployment_description' of null'
TypeError: Cannot read property 'deployment_description' of null
    at /home/jacky/sugarizer-school-portal-server/api/controller/deployments.js:127:21

To which we arrived at the conclusion of doing a null check just before validator.unescape(item.deployment_description);

after doing the following change to do the null check:-

if(item){
    item.deployment_description = validator.unescape(item.deployment_description);
    res.send(item);
    }

I get the following error:- Screenshot from 2021-06-04 14-28-58

ricknjacky commented 3 years ago

fixed in #35