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

114421 add limits unit tests and implementation #4887

Merged

Conversation

r-richardson
Copy link
Contributor

These changes add generic default and maximum values. unit tests, as well as the implementation for limiting various routes:

Test.pm: /tests/list_scheduled_ajax
Asset.pm: */assets
Bug.pm: */bugs
Comment.pm: */jobs/<job_id:num>/comments
Table.pm: */test_suites */machines  */products
Worker.pm: */workers
Job.pm: */jobs
(* = /api/v1)

see: https://progress.opensuse.org/issues/114421

@mergify
Copy link
Contributor

mergify bot commented Nov 4, 2022

This pull request is now in conflicts. Could you fix it? 🙏

@Martchus
Copy link
Contributor

Martchus commented Nov 4, 2022

Look at the list of commits. Some are definitely unrelated. Try rebasing on master skipping all unrelated commits.

@r-richardson r-richardson force-pushed the 114421_add_limits_implementation branch 3 times, most recently from be63fde to b054c4e Compare November 4, 2022 16:45
@r-richardson r-richardson force-pushed the 114421_add_limits_implementation branch 4 times, most recently from 9414933 to 89a736a Compare November 7, 2022 23:27
@r-richardson r-richardson force-pushed the 114421_add_limits_implementation branch 3 times, most recently from 00f8384 to b7c9590 Compare November 8, 2022 22:19
@r-richardson r-richardson marked this pull request as ready for review November 8, 2022 22:37
@codecov
Copy link

codecov bot commented Nov 8, 2022

Codecov Report

Merging #4887 (b7c9590) into master (017ea2d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head b7c9590 differs from pull request most recent head fad9aad. Consider uploading reports for the commit fad9aad to get more accurate results

@@           Coverage Diff            @@
##           master    #4887    +/-   ##
========================================
  Coverage   98.13%   98.13%            
========================================
  Files         378      378            
  Lines       35029    35171   +142     
========================================
+ Hits        34374    34516   +142     
  Misses        655      655            
Impacted Files Coverage Δ
lib/OpenQA/Setup.pm 100.00% <ø> (ø)
t/config.t 100.00% <ø> (ø)
lib/OpenQA/WebAPI/Controller/API/V1/Asset.pm 97.67% <100.00%> (+0.17%) ⬆️
lib/OpenQA/WebAPI/Controller/API/V1/Bug.pm 100.00% <100.00%> (ø)
lib/OpenQA/WebAPI/Controller/API/V1/Comment.pm 100.00% <100.00%> (ø)
lib/OpenQA/WebAPI/Controller/API/V1/Job.pm 95.68% <100.00%> (+0.01%) ⬆️
lib/OpenQA/WebAPI/Controller/API/V1/Table.pm 97.50% <100.00%> (+0.06%) ⬆️
lib/OpenQA/WebAPI/Controller/API/V1/Worker.pm 91.66% <100.00%> (+0.36%) ⬆️
lib/OpenQA/WebAPI/Controller/Test.pm 95.10% <100.00%> (+0.02%) ⬆️
t/api/01-workers.t 100.00% <100.00%> (ø)
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@kalikiana kalikiana left a comment

Choose a reason for hiding this comment

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

Looks very nice. Just a couple smaller comments.

t/api/06-products.t Outdated Show resolved Hide resolved
t/api/06-products.t Outdated Show resolved Hide resolved
@r-richardson r-richardson force-pushed the 114421_add_limits_implementation branch from b7c9590 to dc4ccb5 Compare November 9, 2022 11:48
@r-richardson r-richardson force-pushed the 114421_add_limits_implementation branch from dc4ccb5 to 7fa44ba Compare November 9, 2022 12:57
t/api/05-machines.t Outdated Show resolved Hide resolved
t/ui/01-list.t Outdated Show resolved Hide resolved
lib/OpenQA/WebAPI/Controller/API/V1/Worker.pm Outdated Show resolved Hide resolved
lib/OpenQA/WebAPI/Controller/API/V1/Job.pm Show resolved Hide resolved
@r-richardson r-richardson force-pushed the 114421_add_limits_implementation branch from 7fa44ba to b9ade4c Compare November 9, 2022 17:25
@mergify mergify bot merged commit 900d1d5 into os-autoinst:master Nov 9, 2022
@DimStar77
Copy link
Contributor

Detected fallout while testing new Tumbleweed snapshot: https://progress.opensuse.org/issues/120315

@okurz
Copy link
Member

okurz commented Nov 11, 2022

we will work on this urgently

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

6 participants