uyuni-project / uyuni-tools

Tools to work with containerized Uyuni server
Apache License 2.0
14 stars 18 forks source link

Fix --registry option (bsc#1226436) #367

Closed nadvornik closed 3 months ago

nadvornik commented 3 months ago

What does this PR change?

This PR fixes merging of a container image name with a registry specified separately.

Test coverage

Links

https://bugzilla.suse.com/show_bug.cgi?id=1226436

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Before you merge

Check How to branch and merge properly!

nadvornik commented 3 months ago

I have adjusted the unit test - IMO it is not correct to expect that the path in the alternative registry is the same (see the bug)

Empty registry works OK - the condition !strings.Contains(imageFlags.Name, imageFlags.Registry) is not triggered.