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

test: Factorize registry setup in testDownloadImage() #1953

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

martinpitt
Copy link
Member

Use our setupRegistry() helper.

@martinpitt martinpitt requested review from jelly and mvollmer January 7, 2025 07:05
Copy link
Member

@mvollmer mvollmer left a comment

Choose a reason for hiding this comment

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

Thanks! Let's remove the redundant podman stopping. It's harmless now but can only cause trouble in the future.

self.execute(True, f"podman run -d -p 6000:5000 --name registry_alt --stop-timeout 0 {IMG_REGISTRY}")
# Add local insecure registry into registries conf
self.machine.write("/etc/containers/registries.conf", REGISTRIES_CONF)
self.setupRegistry()
self.execute(True, "systemctl stop podman.service")
Copy link
Member

Choose a reason for hiding this comment

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

This is already included in setupRegistry and doesn't need to be repeated here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for spotting! I meant to do that, but just forgot.

Copy link
Member

@mvollmer mvollmer left a comment

Choose a reason for hiding this comment

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

Thanks!

@mvollmer mvollmer merged commit e044723 into cockpit-project:main Jan 7, 2025
33 checks passed
@martinpitt martinpitt deleted the factor-registry branch January 7, 2025 15:20
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