[TESTS] Low test covarage for Endpoints handler

Bug #1899374 reported by Maysa de Macedo Souza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr-kubernetes
New
Medium
Agha Saad Fraz

Bug Description

The testing coverage for the EndpointsHandler[1] is below the ideal. New unit tests[2] need to be created to cover possible scenarios.

The following scenarios could be added:

- on_present method: check the event is skipped (meaning no crd_spec is created or updated) when the Endpoint has no Pods defined or it's a headless Service.
- on_present method: check the event is skipped (meaning no attempt to updated crd) when the Endpoints has annotations defined, as the
Endpoints annotations are going to be converted to CRD.

[1] https://github.com/openstack/kuryr-kubernetes/blob/master/kuryr_kubernetes/controller/handlers/lbaas.py
[2] https://github.com/openstack/kuryr-kubernetes/blob/master/kuryr_kubernetes/tests/unit/controller/handlers/test_lbaas.py

Example of Endpoints with annotation http://paste.openstack.org/show/799270/

Changed in kuryr-kubernetes:
importance: Undecided → Medium
tags: added: low-hanging-fruit
summary: - Low test covarage for Service and Endpoints handler
+ [TESTS] Low test covarage for Service and Endpoints handler
Changed in kuryr-kubernetes:
assignee: nobody → Agha Saad Fraz (aghasaad04)
summary: - [TESTS] Low test covarage for Service and Endpoints handler
+ [TESTS] Low test covarage for Endpoints handler
description: updated
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.