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

🌱 Unit tests for git client #3328

Merged
merged 3 commits into from
Aug 15, 2023
Merged

Conversation

naveensrinivasan
Copy link
Member

  • Add test functions to the Git client for testing repository initialization, commit listing, and search functionality

[clients/git/client_test.go]

  • Add createTestRepo function to set up a test repository
  • Add TestInitRepo to test the initialization of a repository
  • Add TestListCommits to test the listing of commits
  • Add TestSearch to test the search functionality

What kind of change does this PR introduce?

(Is it a bug fix, feature, docs update, something else?)

What is the current behavior?

What is the new behavior (if this is a feature change)?**

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)


@naveensrinivasan naveensrinivasan self-assigned this Jul 29, 2023
@naveensrinivasan naveensrinivasan temporarily deployed to gitlab July 29, 2023 00:00 — with GitHub Actions Inactive
@naveensrinivasan naveensrinivasan temporarily deployed to gitlab July 29, 2023 00:00 — with GitHub Actions Inactive
@naveensrinivasan naveensrinivasan enabled auto-merge (squash) July 29, 2023 00:00
@naveensrinivasan naveensrinivasan temporarily deployed to integration-test July 29, 2023 00:00 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Jul 29, 2023

Codecov Report

Merging #3328 (1b81712) into main (5ec66fa) will decrease coverage by 11.33%.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3328       +/-   ##
===========================================
- Coverage   74.41%   63.09%   -11.33%     
===========================================
  Files         175      175               
  Lines       12856    12856               
===========================================
- Hits         9567     8111     -1456     
- Misses       2746     4290     +1544     
+ Partials      543      455       -88     

clients/git/client_test.go Outdated Show resolved Hide resolved
clients/git/client_test.go Outdated Show resolved Hide resolved
clients/git/client_test.go Outdated Show resolved Hide resolved
@spencerschrock
Copy link
Contributor

@naveensrinivasan do you plan to continue this one?

@naveensrinivasan
Copy link
Member Author

@naveensrinivasan do you plan to continue this one?

Yes.

- Add test functions to the Git client for testing repository initialization, commit listing, and search functionality

[clients/git/client_test.go]
- Add `createTestRepo` function to set up a test repository
- Add `TestInitRepo` to test the initialization of a repository
- Add `TestListCommits` to test the listing of commits
- Add `TestSearch` to test the search functionality

Signed-off-by: naveensrinivasan <[email protected]>
@naveensrinivasan naveensrinivasan temporarily deployed to gitlab August 14, 2023 01:37 — with GitHub Actions Inactive
@naveensrinivasan naveensrinivasan temporarily deployed to integration-test August 14, 2023 01:37 — with GitHub Actions Inactive
clients/gitlabrepo/contributors_test.go Outdated Show resolved Hide resolved
clients/git/client_test.go Outdated Show resolved Hide resolved
clients/git/client_test.go Outdated Show resolved Hide resolved
clients/git/client_test.go Outdated Show resolved Hide resolved
Signed-off-by: naveensrinivasan <[email protected]>
@naveensrinivasan naveensrinivasan temporarily deployed to gitlab August 15, 2023 16:49 — with GitHub Actions Inactive
@naveensrinivasan naveensrinivasan temporarily deployed to integration-test August 15, 2023 16:49 — with GitHub Actions Inactive
Copy link
Contributor

@spencerschrock spencerschrock left a comment

Choose a reason for hiding this comment

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

Thanks

@spencerschrock spencerschrock temporarily deployed to gitlab August 15, 2023 17:10 — with GitHub Actions Inactive
@spencerschrock spencerschrock temporarily deployed to integration-test August 15, 2023 17:10 — with GitHub Actions Inactive
@naveensrinivasan naveensrinivasan merged commit accaffd into main Aug 15, 2023
37 of 38 checks passed
@naveensrinivasan naveensrinivasan deleted the naveen/tests/clients/git branch August 15, 2023 17:20
ashearin pushed a commit to kgangerlm/scorecard-gitlab that referenced this pull request Nov 13, 2023
- Add test functions to the Git client for testing repository initialization, commit listing, and search functionality

[clients/git/client_test.go]
- Add `createTestRepo` function to set up a test repository
- Add `TestInitRepo` to test the initialization of a repository
- Add `TestListCommits` to test the listing of commits
- Add `TestSearch` to test the search functionality

Signed-off-by: naveensrinivasan <[email protected]>
Signed-off-by: Allen Shearin <[email protected]>
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.

2 participants