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

🌱 Improve GitLab repo status and webhook tests #3368

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

naveensrinivasan
Copy link
Member

  • Update test names and response paths for statuses and webhooks

  • Change the error message when fetching webhooks

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.)


- Update test names and response paths for statuses and webhooks
- Lower the numeric tolerance for test files
- Change the error message when fetching webhooks

[clients/gitlabrepo/statuses_test.go]
- Change the name of the test from "valid webhook" to "valid status"
- Change the name of the test from "invalid webhook" to "failure fetching the status"
- Lower the numeric tolerance for test files
- Change the response path for the valid status test from "./testdata/valid-status" to "./testdata/invalid-status"
[clients/gitlabrepo/webhook_test.go]
- Change the error message when fetching webhooks from "invalid webhook" to "failure fetching webhooks"

Signed-off-by: naveensrinivasan <[email protected]>
@naveensrinivasan naveensrinivasan temporarily deployed to integration-test August 9, 2023 22:03 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #3368 (6c25cff) into main (d7841b9) will decrease coverage by 11.80%.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3368       +/-   ##
===========================================
- Coverage   74.14%   62.34%   -11.80%     
===========================================
  Files         178      178               
  Lines       12876    12876               
===========================================
- Hits         9547     8028     -1519     
- Misses       2788     4409     +1621     
+ Partials      541      439      -102     

@naveensrinivasan naveensrinivasan merged commit 26ef752 into main Aug 9, 2023
40 of 41 checks passed
@naveensrinivasan naveensrinivasan deleted the naveen/unit-tests/gitlab/statuses branch August 9, 2023 22:12
ashearin pushed a commit to kgangerlm/scorecard-gitlab that referenced this pull request Nov 13, 2023
- Update test names and response paths for statuses and webhooks
- Lower the numeric tolerance for test files
- Change the error message when fetching webhooks

[clients/gitlabrepo/statuses_test.go]
- Change the name of the test from "valid webhook" to "valid status"
- Change the name of the test from "invalid webhook" to "failure fetching the status"
- Lower the numeric tolerance for test files
- Change the response path for the valid status test from "./testdata/valid-status" to "./testdata/invalid-status"
[clients/gitlabrepo/webhook_test.go]
- Change the error message when fetching webhooks from "invalid webhook" to "failure fetching webhooks"

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