Skip to content

test: add api integration test for ci_cd_token allowlist #2797

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

Conversation

TimKnight-DWP
Copy link
Contributor

Adding api integration test based off my percieved understanding of the underlying gitlab api and the design as currently documented in the open PR

renovate bot and others added 15 commits January 26, 2024 14:39
* fix(cli): allow exclusive arguments as optional

The CLI takes its arguments from the RequiredOptional, which has three fields: required, optional, and exclusive. In practice, the exclusive options are not defined as either required or optional, and would not be allowed in the CLI. This changes that, so that exclusive options are also added to the argument parser.

  * fix(cli): inform argument parser that options are mutually exclusive

  * fix(cli): use correct exclusive options, add unit test

Closes python-gitlab#2769
The version of `black` needs to be updated to be in sync with what is
in `requirements-lint.txt`
* feat(api): allow updating protected branches

Closes python-gitlab#2390
@TimKnight-DWP TimKnight-DWP marked this pull request as ready for review February 13, 2024 16:17
@TimKnight-DWP TimKnight-DWP changed the base branch from feat/job-token-scope-allowlist to main February 14, 2024 09:53
@TimKnight-DWP TimKnight-DWP force-pushed the feat/job-token-scope-allowlist branch 2 times, most recently from 748f4cd to ff9e76c Compare February 14, 2024 10:47
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
@TimKnight-DWP TimKnight-DWP force-pushed the feat/job-token-scope-allowlist branch from ff9e76c to 4203bec Compare February 14, 2024 11:04
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
@TimKnight-DWP TimKnight-DWP changed the base branch from main to feat/job-token-scope-allowlist February 14, 2024 11:33
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (72e1aa7) 88.25% compared to head (e2cae65) 96.45%.
Report is 1 commits behind head on feat/job-token-scope-allowlist.

Additional details and impacted files
@@                        Coverage Diff                         @@
##           feat/job-token-scope-allowlist    #2797      +/-   ##
==================================================================
+ Coverage                           88.25%   96.45%   +8.19%     
==================================================================
  Files                                  90       90              
  Lines                                5866     5888      +22     
==================================================================
+ Hits                                 5177     5679     +502     
+ Misses                                689      209     -480     
Flag Coverage Δ
api_func_v4 82.21% <51.72%> (?)
cli_func_v4 83.54% <68.96%> (?)
unit 88.24% <79.31%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
gitlab/_backends/protocol.py 92.85% <100.00%> (+11.60%) ⬆️
gitlab/client.py 98.58% <ø> (+4.03%) ⬆️
gitlab/v4/cli.py 91.69% <100.00%> (+43.57%) ⬆️
gitlab/v4/objects/artifacts.py 100.00% <ø> (+10.34%) ⬆️
gitlab/v4/objects/audit_events.py 100.00% <ø> (ø)
gitlab/v4/objects/branches.py 100.00% <100.00%> (+8.69%) ⬆️
gitlab/v4/objects/deployments.py 93.10% <ø> (ø)
gitlab/v4/objects/features.py 100.00% <ø> (+31.57%) ⬆️
gitlab/v4/objects/merge_requests.py 89.18% <ø> (+18.91%) ⬆️
gitlab/v4/objects/projects.py 98.78% <ø> (ø)
... and 6 more

... and 37 files with indirect coverage changes

@TimKnight-DWP
Copy link
Contributor Author

Relates to: #2767

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.

6 participants