Commit Graph

22 Commits

Author SHA1 Message Date
Maksym Pavlenko
552d763447 Use image lists in client tests
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-25 10:47:00 -07:00
haoyun
bbe46b8c43 feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io>
Co-authored-by: zounengren <zouyee1989@gmail.com>
2022-01-07 10:27:03 +08:00
Gabriel Adrian Samfira
aadae6d50b
Fix flakiness on Windows for list stats
This change fixes flakiness on Windows for TestContainerListStatsWithSandboxIdFilter

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-12-17 17:38:37 +02:00
Wei Fu
8de1117c99 integration: add stats result in error message
```
// from  https://github.com/containerd/containerd/pull/6150#issuecomment-974747473

container_stats_test.go:364:
        	Error Trace:	container_stats_test.go:364
        	Error:      	Received unexpected error:
        	            	unexpected stats length
        	            	github.com/containerd/containerd/integration.TestContainerListStatsWithIdSandboxIdFilter.func4
        	            		/home/runner/work/containerd/containerd/integration/container_stats_test.go:371
        	            	github.com/containerd/containerd/integration.Eventually
        	            		/home/runner/work/containerd/containerd/integration/main_test.go:324
        	            	github.com/containerd/containerd/integration.TestContainerListStatsWithIdSandboxIdFilter
        	            		/home/runner/work/containerd/containerd/integration/container_stats_test.go:364
        	            	testing.tRunner
        	            		/opt/hostedtoolcache/go/1.17.3/x64/src/testing/testing.go:1259
        	            	runtime.goexit
        	            		/opt/hostedtoolcache/go/1.17.3/x64/src/runtime/asm_amd64.s:1581
        	Test:       	TestContainerListStatsWithIdSandboxIdFilter
```

Add stats result for the purpose of debug.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-11-28 16:57:40 +08:00
Phil Estes
cf600abecc
Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha
[CRI] move up to CRI v1 and support v1alpha in parallel
2021-07-09 14:07:24 -04:00
Mike Brown
a5c417ac06 move up to CRI v1 and support v1alpha in parallel
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-06-28 09:34:12 -05:00
Claudiu Belu
cabe677369 tests: Use EnsureImageExists for image pulling
A previous commit introduced EnsureImageExists, which ensures that a particular image
already exists. It also deduplicates the image pulling code. Some tests missed this
update.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-03 16:02:42 +00:00
Claudiu Belu
a78bdf22df tests: Refactors PodSandbox creation
Most of the tests creating and using Pod Sandboxes in the same way. We can create
a common function that will do that for us, so we can have less duplicated code,
and make it easier to add new tests in the future.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-03 16:02:38 +00:00
Claudiu Belu
09a0c9471b tests: Adds support for Windows cri-integration tests
Currently, the cri-integration tests do not work on Windows due to various reasons.
One of the reasons is because all the tests are using Linux-specific images.
Previous commits refactored the image pulling / usage in the cri-integration tests,
making it easier to update, and easier to configure a custom registry to pull images
with Windows support.

For Windows runs, custom registries can be created, which will also contain Windows
images, and the cri-integration tests can be configured to use those registries by
specifying the "--repo-list" argument, a YAML file which will contain an alternative
mapping of the default registries. This is similar to how E2E tests are handled for
Windows runs in Kubernetes.

Some of the tests are Skipped, as they do not pass yet on Windows.

Windows does not collect inodes used stats, thus, the tests that were expecting non-zero
inodes stats were failing.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-05-14 11:27:35 +00:00
Claudiu Belu
3187b6dc81 tests: Adds consumed memory stats test
We can check that the reported containers stats are not lower than it should
by using the resource-consumer image. This image contains stress / testlimit.exe
which can consume a specified amount of memory.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-04-29 14:11:34 +00:00
Derek McGowan
07c98d0bf1 Fix lint in Unix environments
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-05 17:46:01 -07:00
Derek McGowan
77cf032195 Enable golangci on Windows
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-01 09:01:16 -07:00
Mike Brown
1b60224e2e use containerd/project header test
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-04-22 19:35:37 -05:00
Lantao Liu
ba8788c6b9 Update kubernetes dependency to 1.15.0.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-07-31 23:52:03 -07:00
Lantao Liu
0580ce45fd Update test based on new CRI.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-10-05 11:01:20 -07:00
Lantao Liu
e1fe1abff0 Use github.com/pkg/errors
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-17 02:24:38 +00:00
Lantao Liu
05bcc3e88c Update makefile and all integration test
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-05 21:45:20 +00:00
Lantao Liu
6900cbdada Use mountpoint as image fs identifier.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-09 07:46:49 +00:00
Lantao Liu
605b4a7b6a Update imports
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-08 02:45:44 +00:00
yanxuean
12bbbc0edc add unit test for listcontainer and listpodsandbox
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-11-07 15:57:29 +08:00
yanxuean
6234337459 Add truncindex for filter in List and Stat
fix #344
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-11-06 16:47:43 +08:00
Abhinandan Prativadi
853804bd8e Adding integration test for container stats
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2017-09-26 12:03:15 -07:00