Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests #176

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Add unit tests #176

wants to merge 18 commits into from

Conversation

matewolf
Copy link

Related to #11 .

Pull request contains unit tests for all the component that is not just a wrapper of a third party package. I made major changes in code to reach testability: I created mocks and new interfaces and refactored the business logic.

I also found some issues during testing. The affected tests are commented. New issues will be created soon based on findings.

Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
@matewolf matewolf requested a review from a team as a code owner August 28, 2023 16:12
Signed-off-by: matewolf <matewolf96@gmail.com>
@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Merging #176 (d1288c8) into main (508d234) will increase coverage by 39.96%.
The diff coverage is 29.18%.

@@            Coverage Diff             @@
##            main     #176       +/-   ##
==========================================
+ Coverage   0.00%   39.96%   +39.96%     
==========================================
  Files          1        6        +5     
  Lines         67      663      +596     
==========================================
+ Hits           0      265      +265     
- Misses        67      389      +322     
- Partials       0        9        +9     
Files Changed Coverage Δ
internal/config/mock.go 0.00% <0.00%> (ø)
internal/utils/comment/mock.go 0.00% <0.00%> (ø)
internal/utils/issue/mock.go 0.00% <0.00%> (ø)
internal/config/config.go 33.00% <38.59%> (ø)
internal/utils/comment/comment.go 44.44% <45.45%> (ø)
internal/utils/issue/issue.go 59.17% <50.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Signed-off-by: matewolf <matewolf96@gmail.com>
Copy link
Contributor

@justaugustus justaugustus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

branch conflict needs to be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants