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

Separate make targets that require elevated privileges #461

Merged
merged 1 commit into from
Apr 5, 2022

Conversation

chofnar
Copy link
Contributor

@chofnar chofnar commented Mar 16, 2022

What type of PR is this?
cleanup

Which issue does this PR fix:
#459

What does this PR do / Why do we need it:
This PR separates the tests that need some sort of privileged execution from the ones that don't by use of new make targets.
This allows running without needing privileges or when they are not available.
Additionally, this PR will now make tests run on every platform (make test was only run on linux && amd64).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@chofnar chofnar linked an issue Mar 16, 2022 that may be closed by this pull request
@chofnar chofnar force-pushed the sudoRemove branch 18 times, most recently from 6058548 to 6285ec8 Compare March 22, 2022 17:36
@chofnar chofnar force-pushed the sudoRemove branch 2 times, most recently from 7a2f4b5 to fd9a32a Compare March 23, 2022 09:26
@codecov
Copy link

codecov bot commented Mar 23, 2022

Codecov Report

Merging #461 (b27c120) into main (ceb8c8a) will decrease coverage by 0.59%.
The diff coverage is n/a.

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

@@            Coverage Diff             @@
##             main     #461      +/-   ##
==========================================
- Coverage   85.00%   84.41%   -0.60%     
==========================================
  Files          52       51       -1     
  Lines       10623    10548      -75     
==========================================
- Hits         9030     8904     -126     
- Misses       1235     1287      +52     
+ Partials      358      357       -1     
Impacted Files Coverage Δ
pkg/extensions/extensions.go 80.82% <0.00%> (-3.80%) ⬇️
pkg/storage/scrub.go 86.85% <0.00%> (-2.28%) ⬇️
pkg/api/routes.go 74.79% <0.00%> (-2.10%) ⬇️
pkg/storage/storage_fs.go 79.16% <0.00%> (-2.02%) ⬇️
pkg/extensions/sync/sync.go 85.51% <0.00%> (-1.38%) ⬇️
pkg/api/controller.go 91.56% <0.00%> (-0.11%) ⬇️
pkg/api/errors.go 100.00% <0.00%> (ø)
pkg/extensions/scrub/scrub.go

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@chofnar chofnar force-pushed the sudoRemove branch 6 times, most recently from 278bdc0 to 43bcbdb Compare March 23, 2022 15:22
@andaaron andaaron added this to In progress in zot-core via automation Mar 23, 2022
zot-core automation moved this from In progress to Reviewer approved Mar 28, 2022
andaaron
andaaron previously approved these changes Mar 28, 2022
pkg/cli/client_test.go Outdated Show resolved Hide resolved
zot-core automation moved this from Reviewer approved to Review pending Mar 29, 2022
andaaron
andaaron previously approved these changes Mar 29, 2022
zot-core automation moved this from Review pending to Reviewer approved Mar 29, 2022
zot-core automation moved this from Reviewer approved to Review pending Mar 30, 2022
@chofnar chofnar requested a review from rchincha March 30, 2022 16:30
.github/workflows/ci-cd.yml Show resolved Hide resolved
.github/workflows/ci-cd.yml Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
pkg/cli/client_elevated_test.go Outdated Show resolved Hide resolved
@chofnar chofnar force-pushed the sudoRemove branch 5 times, most recently from 278e054 to badd1bd Compare April 4, 2022 07:15
andaaron
andaaron previously approved these changes Apr 4, 2022
zot-core automation moved this from Review pending to Reviewer approved Apr 4, 2022
@rchincha rchincha added this to the v1.4.0 milestone Apr 4, 2022
Reworked privileged cert test so it runs in Go by moving make logic to Go logic

Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
zot-core automation moved this from Reviewer approved to Review pending Apr 5, 2022
zot-core automation moved this from Review pending to Reviewer approved Apr 5, 2022
Copy link
Contributor

@rchincha rchincha left a comment

Choose a reason for hiding this comment

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

lgtm

@rchincha rchincha merged commit 475d97b into project-zot:main Apr 5, 2022
zot-core automation moved this from Reviewer approved to Done Apr 5, 2022
@chofnar chofnar deleted the sudoRemove branch July 29, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
zot-core
  
Done
Development

Successfully merging this pull request may close these issues.

Remove sudo from makefile and test files
4 participants