Commit Graph

13 Commits

Author SHA1 Message Date
Jeff Widman
050cd58ce6 Drop deprecated ioutil
`ioutil` has been deprecated by golang. All the code in `ioutil` just
forwards functionality to code in either the `io` or `os` packages.

See https://github.com/golang/go/pull/51961 for more info.

Signed-off-by: Jeff Widman <jeff@jeffwidman.com>
2022-07-23 08:36:20 -07:00
Gabriel Adrian Samfira
80bc32f069
Use temp file for export/import test
Using a bytes buffer for this test increases the memory usage on Windows
to over 3 GB. Using a temporary file as a destination for the image
keeps memory usage at a reasonable level.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-03-10 11:48:38 +02:00
Derek McGowan
2c96d5b067
Run windows parallel integration test as short
This prevents tests which spawn daemons from running at
the same time as the first integration test.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-12-09 11:45:38 -08:00
Derek McGowan
665877a5bf
Move volume images from gcr to ghcr
With the ghcr images now built and working, switch over to
use these new images and update the default name.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-12-02 10:29:44 -08:00
Daniel Canter
2a6857d060 Skip TestExportAndImportMultiLayer on Windows
This change skips the TestExportAndImportMultiLayer in integration/client
for the time being. It seems the image was updated recently and no longer
has a Windows entry in the manifest so the test will always fail. This should
be reverted when we figure out what happened to the image, but this is to
unblock PRs for the time being.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2021-12-01 16:58:52 -08:00
Phil Estes
e648fa2e81
Merge pull request #5933 from claudiubelu/integration/import-multilayer
integration: Adds test for multilayer image import
2021-10-07 14:09:25 -04:00
Derek McGowan
63b7e5771e
Merge pull request #5973 from Juneezee/deprecate-ioutil
refactor: move from io/ioutil to io and os package
2021-10-01 10:52:06 -07:00
Claudiu Belu
7a7a9a282c integration: Adds test for multilayer image import
This test will make sure there aren't any issues with multilayered
images during import. Keep in mind that in the case of multilayered
images, they have to be unpacked first in order to be usable.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-22 10:03:16 -07:00
Eng Zer Jun
50da673592
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-09-21 09:50:38 +08:00
Claudiu Belu
e087b47e98 import: Raise error if the imported image is filtered out
During import, if an image does not match the host's platform,
it won't have any children labels set, which will result in the
Garbage Collector deleting its content later, resulting in an
unusable image. In this case, we should fail early.

This can still be bypassed by using ctr import --all-platforms.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-13 11:19:48 -07:00
Paul "TBBle" Hampson
c7504987e6 Implement windowsDiff.Compare via hcsshim/pkg/ociwclayer
This parallels the implementation of windowsDiff.Apply, including
bouncing very briefly though archive.WriteDiff and then straight back
out into Windows-specific code.

It's mostly pulling existing mechanisms from non-Windows Compare or
Windows Apply, and highlights that there's probably a lot of scope for
refactoring on top of this.

Now the export-related integration tests pass CI on Windows.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2021-04-10 02:02:33 +10:00
Sebastiaan van Stijn
1faca349ea
integration/client: rename package to "client"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-30 16:21:36 +02:00
Davanum Srinivas
6a4aa1e2e7
Separate go module for client tests
Will help us drop dependency to github.com/Microsoft/hcsshim/test in the
main go.mod

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-03-11 19:27:45 -05:00