dyrector-io / dyrectorio

dyrector.io is a self-hosted continuous delivery & deployment platform with version management.
https://dyrectorio.com
Apache License 2.0
1.25k stars 92 forks source link

Write unit tests for agent and we'll send you an awesome dyrectorio swag cap #241

Closed polaroi8d closed 1 year ago

polaroi8d commented 1 year ago

Right now /agent service code coverage is around 8.67% - at events such as Hacktoberfest, it's a good first issue to write unit tests around the code base. You can add tests to /cli if you're a black belt unit test writer.

We know unit test writing isn't the most exciting task, so we'd like to motivate our contributors. So if you add more than 10% coverage in the golang side of the repository, we'll send you an awesome dyrectorio swag cap.

You can find codecov agent/ coverage: https://app.codecov.io/gh/dyrector-io/dyrectorio/blob/develop/agent/pkg/builder/container/types.go

clebs commented 1 year ago

Hi @polaroi8d, I find the project quite interesting and can write some unit tests for the agent.

polaroi8d commented 1 year ago

Hi @clebs it would be amazing ๐Ÿงจ

clebs commented 1 year ago

Hi @polaroi8d, I tested the first pkg on the agent. I will test more packages when I have time but will always send PRs with one pkg each to not overwhelm the reviewers.

Looking forward to your feedback.

polaroi8d commented 1 year ago

Hi @polaroi8d, I tested the first pkg on the agent. I will test more packages when I have time but will always send PRs with one pkg each to not overwhelm the reviewers.

Looking forward to your feedback.

Good strategy, thanks! :)))

joremysh commented 1 year ago

I could help with adding the unit tests. Is this issue still open?

polaroi8d commented 1 year ago

@joremysh yea sure, thanks ๐Ÿคš๐Ÿป

Dinoosawruss commented 1 year ago

Happy to add some tests if still needed?

polaroi8d commented 1 year ago

@Dinoosawruss go ahead!

Fall1ngStar commented 1 year ago

๐Ÿ‘‹ I'll add some tests ! (Focusing on agent/pkg/dagent for now)

polaroi8d commented 1 year ago

@Fall1ngStar awesome!

SilverTux commented 1 year ago

Hi,

I've created some tests for crane/k8s/error.go as I saw nobody worked on that part before. If there is something wrong with it please let me know and I'll update the PR accordingly.

joremysh commented 1 year ago

I'm going to check with agent/internal/crypt first.

clebs commented 1 year ago

I am testing agent/internal/mapper next!

clebs commented 1 year ago

Hi @nandor-magyar I added a PR for the mapper that was previously on the agent. I saw it moved to golang/internal while I was implementing the tests.

I hope it is still fine.

polaroi8d commented 1 year ago

Ofc @clebs we'll review it. Otherhand could you drop me an email at levente.orban[at]dyrector[dot]io ?

clebs commented 1 year ago

Great thank you! Will send you an email as well.