kube-reqsizer icon indicating copy to clipboard operation
kube-reqsizer copied to clipboard

Add Go Tests

Open amitai-devops opened this issue 3 years ago • 2 comments

amitai-devops avatar Dec 19 '22 14:12 amitai-devops

@amitai-devops @jatalocks could you please give more details about this issue? I could not find PodReconciler for adding tests

tanryberdi avatar Dec 20 '22 06:12 tanryberdi

Hey @tanryberdi, thank you first very much for your contribution! I am not too advanced in Go and haven't learned yet how to write Tests but I know its needed. This project doesn't have a lot of files but I've split them between 3 main ones:

Structs and Types: pod_controller_types.go. This file contains the "PodReconciler" struct type.

Functions: pod_controller_functions.go

Main Function (Reconciliation Loop), the one main.go enters: pod_controller.go. This file contains the "PodReconciler" function.

All that is needed to is write a pod_controller_tests.go I assume and make sure it checks the core function of this controller.

amitai-devops avatar Dec 20 '22 06:12 amitai-devops