konveyor / move2kube-api

HTTP REST API for move2kube
https://move2kube.konveyor.io/
Apache License 2.0
6 stars 18 forks source link

Add unit tests for move2kube-api #21

Open ashokponkumar opened 3 years ago

ashokponkumar commented 3 years ago

Use the go's unit test framework similar to https://github.com/konveyor/move2kube/blob/master/types/info/versioninfo_test.go and write unit-tests for move2kube-api.

IsabellaDev commented 3 years ago

I'd like to try on this, but I'm new to Golang, could you please give me some hint like which functions need a test function? I checked your sample and noticed that not all functions have a test one. Thanks.

ashokponkumar commented 3 years ago

@HarikrishnanBalagopal Can you give some high level guidance on how we could test this package?

nasirhm commented 1 year ago

I would like to work on this @ashokponkumar

ashokponkumar commented 1 year ago

I would like to work on this @ashokponkumar

Sure @nasirhm .

nasirhm commented 1 year ago

@ashokponkumar / @HarikrishnanBalagopal Looking at the types in move2kube-api, They're all available in a single types.go: https://github.com/konveyor/move2kube-api/blob/main/internal/types/types.go . Should i begin by writing unit test cases for this one ?

ashokponkumar commented 1 year ago

@ashokponkumar / @HarikrishnanBalagopal Looking at the types in move2kube-api, They're all available in a single types.go: https://github.com/konveyor/move2kube-api/blob/main/internal/types/types.go . Should i begin by writing unit test cases for this one ?

@HarikrishnanBalagopal Can you please look into @nasirhm 's question.

HarikrishnanBalagopal commented 1 year ago

@ashokponkumar / @HarikrishnanBalagopal Looking at the types in move2kube-api, They're all available in a single types.go: https://github.com/konveyor/move2kube-api/blob/main/internal/types/types.go . Should i begin by writing unit test cases for this one ?

Hi @nasirhm , Thanks for looking into this issue. https://github.com/konveyor/move2kube/issues/881 You can look at the above for some tutorials and steps on how to get started writing tests.

The types package you mentioned is a good place to start since it has small functions which you can test individually. Please let us know if you get stuck.

satyazzz123 commented 8 months ago

@ashokponkumar @HarikrishnanBalagopal can I work on this issue?

satyazzz123 commented 6 months ago

@HarikrishnanBalagopal @ashokponkumar i have raised a PR. Please have a look