-
Notifications
You must be signed in to change notification settings - Fork 256
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/functional: Add flag for container layer paths, remove containerd dependence #1536
Conversation
ff68acc
to
6214799
Compare
I'd add a little blurb in the title stating that this is for tests (e.g. Tests: Add flag for container layer paths). Before clicking on this I was wondering what component this was going to be for 😆 |
e6c1beb
to
a98c246
Compare
I was coming here to say the same thing. Maybe a |
Just noticed it was actually updated already. It's a good practice to use a prefix like I had above to indicate the scope of a change. That makes it easier to tell what a change affects at a glance. So I'd still be in favor of that. |
Replacing containerd with |
I think tests would start failing, so we would notice, but that is true. The alternative is that our functional test, which only test portions code within the shim, rely on containerd to run, so we have to install it to unpack images. I feel like that complicates our testing pipelines |
Add lcow/wcow layer paths flag to allow providing image layer paths instead of requiring containerd to pull and unpack it. The goal is to allow functional tests to be run without requiring containerd to be installed. Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
Changed `(LazyImageLayers).ImageLayers` to `(LazyImageLayers).Layers`. `(LazyImageLayers).Close` now returns an error. Comment cleanup. Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
f345150
to
49c435e
Compare
rebased for merge conflicts |
49c435e
to
ef02443
Compare
Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
f070297
to
9b65d58
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.
LGTM!
Why do we want this? Is there some scenario we want to run this where we don't have containerd to connect to? |
To decouple our tests from containerd, mostly for CI/CD pipelines. |
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.
Two comments that may require some additional code to add, but otherwise, LGTM.
Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
9b65d58
to
3ab6af7
Compare
Backport testing support functions in the `test/pkg` directory. This includes changes from: - microsoft#1536 - microsoft#1704 - microsoft#1853 - microsoft#1893 Rather than cherry-pick them, only changes to `test/pkg` are included, since tests themselves will require significant changes to bring up-to-date. The goal is to expose testing functions so that tests can be moved out of the repo. Updated go version in `test` to 1.8, as required by `test/pkg/flag`. Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
Backport testing support functions in the `test/pkg` directory. This includes changes from: - #1536 - #1704 - #1853 - #1893 Rather than cherry-pick them, only changes to `test/pkg` are included, since tests themselves will require significant changes to bring up-to-date. The goal is to expose testing functions so that tests can be moved out of the repo. Updated go version in `test` to 1.8, as required by `test/pkg/flag`. Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
Add lcow/wcow layer paths flag to allow providing image layer paths.
Remove dependence on containerd, and instead use github.com/google/go-containerregistry/ (which the dmverity exe uses) to download the images if none are provided.
The goal is to allow functional tests to be run without requiring containerd to be installed.
Signed-off-by: Hamza El-Saawy hamzaelsaawy@microsoft.com