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: test for packages API from github #1049

Merged
merged 75 commits into from
Sep 24, 2024
Merged

Add: test for packages API from github #1049

merged 75 commits into from
Sep 24, 2024

Conversation

gabrielschowe
Copy link
Contributor

@gabrielschowe gabrielschowe commented Sep 16, 2024

What

Add: Tests for function of the github package api

Why

References

DEVOPS-1022

Checklist

  • Tests

Copy link

github-actions bot commented Sep 16, 2024

Conventional Commits Report

Type Number
Removed 9
Added 13
Changed 9
Bug Fixes 14

🚀 Conventional commits found.

Copy link

codecov bot commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 87.96296% with 13 lines in your changes missing coverage. Please review.

Project coverage is 90.33%. Comparing base (e3149be) to head (fec5e5a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pontos/github/api/packages.py 79.66% 5 Missing and 7 partials ⚠️
pontos/github/api/api.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1049      +/-   ##
==========================================
- Coverage   90.37%   90.33%   -0.04%     
==========================================
  Files         103      105       +2     
  Lines        6981     7089     +108     
  Branches      990     1006      +16     
==========================================
+ Hits         6309     6404      +95     
- Misses        472      478       +6     
- Partials      200      207       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gabrielschowe gabrielschowe force-pushed the gabriel/packageApi branch 2 times, most recently from d4ee833 to e6b5278 Compare September 23, 2024 11:32
@gabrielschowe gabrielschowe marked this pull request as ready for review September 23, 2024 11:32
@gabrielschowe gabrielschowe requested a review from a team as a code owner September 23, 2024 11:32
@gabrielschowe gabrielschowe enabled auto-merge (squash) September 23, 2024 11:45
Copy link

@robert-schardt robert-schardt left a comment

Choose a reason for hiding this comment

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

Tested by running:
poetry run python -m unittest -v tests/github/api/test_packages.py
poetry run python -m unittest -v tests/github/api/test_organizations.py
-> Tests succeeding

GITHUB_TOKEN=Token poetry run pontos-github-script pontos/github/scripts/delete-package-with-tag.py greenbone pipeline-experiments sha-414af7b
-> Package deleted

GITHUB_TOKEN=Token poetry run pontos-github-script pontos/github/scripts/find-package-tag.py greenbone pipeline-experiments sha-414af7b
-> Package not found <- that is correct

GITHUB_TOKEN=Token poetry run pontos-github-script pontos/github/scripts/find-package-tag.py greenbone pipeline-experiments sha-988f4e9
-> Package found

@gabrielschowe gabrielschowe merged commit 76558b7 into main Sep 24, 2024
19 of 21 checks passed
@gabrielschowe gabrielschowe deleted the gabriel/packageApi branch September 24, 2024 09:37
@y0urself y0urself mentioned this pull request Sep 26, 2024
1 task
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.

3 participants