-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Use fake images for machine tests #27493
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
5031ea4 to
b8955e2
Compare
In tests that do not start a machine, we can use "fake" images to speed up tests. In the case of darwin and Linux, that can be /dev/null. The hypervisors don't care. In the case of Windows, some research will need to be done to determine the same approach but this is a start. Signed-off-by: Brent Baude <bbaude@redhat.com>
|
LGTM |
|
+1 from me - we are having serious timing issues with these tests. |
Luap99
left a comment
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 don't care to much, I am fine merging as is but I think a a small doc on when/how to use it would help contributors understand when to use it.
If you like to merge as is feel free to drop the hold
/lgtm
/hold
| fakeImagePath string = os.DevNull | ||
| ) | ||
|
|
||
| func (i *initMachine) withFakeImage(_ *machineTestBuilder) *initMachine { |
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.
minor style nits, given this is the same for everything except windows it would be less duplication to create a new file config_fakeimage.go that uses //go:build !windows as build tag
Also it would be good to add a function comment as documentation what this is for, i.e. when to use this in tests.
|
/hold cancel |
this pr is a follow on to containers#27493. it adds support for hyperv "fake" images and suggests a benefit in terms of test speed. for hyperv, we create a generic 4MB vhdx and stick it into the temp dir. this saves us from any image copy or compression. i also followed up on a few comments Paul made about using windows|unix instead of each platform. Signed-off-by: Brent Baude <bbaude@redhat.com>
this pr is a follow on to containers#27493. it adds support for hyperv "fake" images and suggests a benefit in terms of test speed. for hyperv, we create a generic 4MB vhdx and stick it into the temp dir. this saves us from any image copy or compression. i also followed up on a few comments Paul made about using windows|unix instead of each platform. Signed-off-by: Brent Baude <bbaude@redhat.com>
this pr is a follow on to containers#27493. it adds support for hyperv "fake" images and suggests a benefit in terms of test speed. for hyperv, we create a generic 4MB vhdx and stick it into the temp dir. this saves us from any image copy or compression. i also followed up on a few comments Paul made about using windows|unix instead of each platform. Signed-off-by: Brent Baude <bbaude@redhat.com>
Two PRs[1,2] were merged without rebasing resulting in a conflict since the one enabled gofumpt while the other PR contained formatting not according to that so now the lint fails. [1] containers#27498 [2] containers#27493 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
this pr is a follow on to containers#27493. it adds support for hyperv "fake" images and suggests a benefit in terms of test speed. for hyperv, we create a generic 4MB vhdx and stick it into the temp dir. this saves us from any image copy or compression. i also followed up on a few comments Paul made about using windows|unix instead of each platform. Signed-off-by: Brent Baude <bbaude@redhat.com>
this pr is a follow on to containers#27493. it adds support for hyperv "fake" images and suggests a benefit in terms of test speed. for hyperv, we create a generic 4MB vhdx and stick it into the temp dir. this saves us from any image copy or compression. i also followed up on a few comments Paul made about using windows|unix instead of each platform. Signed-off-by: Brent Baude <bbaude@redhat.com>
this pr is a follow on to containers#27493. it adds support for hyperv "fake" images and suggests a benefit in terms of test speed. for hyperv, we create a generic 4MB vhdx and stick it into the temp dir. this saves us from any image copy or compression. i also followed up on a few comments Paul made about using windows|unix instead of each platform. Signed-off-by: Brent Baude <bbaude@redhat.com>
In tests that do not start a machine, we can use "fake" images to speed up tests. In the case of darwin and Linux, that can be /dev/null. The hypervisors don't care.
In the case of Windows, some research will need to be done to determine the same approach but this is a start.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?