toolbox icon indicating copy to clipboard operation
toolbox copied to clipboard

[Contribution] - Unit test

Open masch opened this issue 6 years ago • 6 comments

Hi!

I love toolbox project so I'm asking if I could do some contribution on the project. I have experience on Golang so I'm considering to add some unit test on toolbox. I don't know if you are open to this king of PR, if you are not, Could your suggest me another kind on issue that involves Golang development?

Thanks!

masch avatar Jun 13 '20 21:06 masch

Hi @masch! Yes, this is definitely something we need very much. I myself wanted to create some unit tests but didn't get to it yet.

martymichal avatar Jun 14 '20 13:06 martymichal

Great! Thanks wonderful!! :tada: I don't know if you have something in mind on how to approach it, but I'm a big fund of testify library. What do you think about it? If you like, I could do a simple PR and see if that's what you have in mind.

Hear there are some examples of the library: https://github.com/stretchr/testify

masch avatar Jun 14 '20 13:06 masch

I don't really have a strong opinion about how the tests should look and how they should be written. I planned to use the built-in testing functionality but I read about testify already and seems to be well documented and fairly popular.

I look forward to the PR!

martymichal avatar Jun 14 '20 14:06 martymichal

Hey @masch ! Thanks for stopping by.

What I would love to see are some unit tests for individual functions. eg., while reviewing https://github.com/containers/toolbox/pull/470, which is about the CheckVersion function in the podman package, I really felt the lack of any tests that would tell me that the function hasn't regressed in some strange way.

debarshiray avatar Jun 24 '20 16:06 debarshiray

Hey @masch ! Thanks for stopping by.

What I would love to see are some unit tests for individual functions. eg., while reviewing #470, which is about the CheckVersion function in the podman package, I really felt the lack of any tests that would tell me that the function hasn't regressed in some strange way.

Hey @debarshiray, Thanks for your reply. Ok. I will add some unit test on it.

masch avatar Jun 24 '20 18:06 masch

I'm closing this due to inactivity.

Any kind of contribution is welcome, including unit tests!

martymichal avatar Jul 07 '21 10:07 martymichal