-
Notifications
You must be signed in to change notification settings - Fork 695
Test images: cleanup and centralize #4194
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
57c0321
to
ef657f7
Compare
4d4ee15
to
260ee6e
Compare
260ee6e
to
21412de
Compare
21412de
to
b43043a
Compare
b43043a
to
dd1c643
Compare
YAML variant incoming. |
3231391
to
29e5871
Compare
|
||
var testImages map[string]TestImage | ||
|
||
func getImage(key string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have a test for this func getImage
:) !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think testing test tools is a bit much :) (well, core testing like tigron sure, it should be tested - but this here is just a yaml file getting parsed).
Also this is going to evolve soon with upcoming PRs so let see when this is getting finalized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean unit test but ok not mandatory regarding the impact
# Current schema (defined in images_linux.go) allows for ref, tag, (index) digest and platform variants. | ||
# Right now, digest and variants are not used for anything, but they should / could be in the future. | ||
# Also note that changing the schema should be easy and straight-forward for now, so, | ||
# this might evolve in the near future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be document how to add new images or update existing ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do in upcoming PRs once we stabilize the schema?
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
29e5871
to
cfb5a16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Why
Test images do not currently digest pin when pulling (they should).
Furthermore, test images are peppered all over the place, with some tests using direct references, and some images being defined in platform specific files.
Finally, there is currently no easy mechanism for external scripts to override a specific image version on the fly (eg: for example to test a different registry version on canary).
What this is
This offers to consolidate all test images references inside an embedded file.
Using an embed will allow external tests scripts to more easily manipulate the list and versions (eg: for "canaries") rather than having to parse go source files.
Images in the yaml file can use digest pinning in the future - though right now, we cannot yet do that for a few reasons:
Nevertheless, this is a first step to solving these issues - future PRs to follow.