Commit Graph

14 Commits

Author SHA1 Message Date
Krisztian Litkey
ca84aba6cc integration: add first NRI integration tests.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2022-11-28 21:51:25 +02:00
Gabriel Adrian Samfira
9494f0b806 Add HyperV config in tests
This change adds two new environment variables to cri-integration tests
on Windows that enable Hyper-V isolation.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-10-26 13:33:45 +03:00
Qiutong Song
b41d6f40bb Update container with sandbox metadata after NetNS is created
Signed-off-by: Qiutong Song <songqt01@gmail.com>
2022-10-09 01:14:08 +00:00
Samuel Karp
b92f3160a7
cri-integration: propagate ENABLE_CRI_SANDBOXES
sudo(8) strips environment variables by default.  Explicitly set
ENABLE_CRI_SANDBOXES so we can ensure we test the sbserver CRI
implementation.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2022-09-20 18:38:09 -07:00
Wei Fu
3c5e80b63e integration: Add injected failpoint testing for RunPodSandbox
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-07-22 23:25:40 +08:00
Gabriel Adrian Samfira
78ad7a2d3a
cri-integration: Add Windows default paths
This change adds the following:

  * Default paths to REPORT_DIR, CONTAINERD_STATE and
CONTAINERD_ROOT for Windows
  * Removes the need for nssm on Windows. The nssm service
has issues dealing with paths that contain spaces. Also, the
containerd binary is perfectly capable of registering itself
as a service in Windows, and Windows itself can take care of
any failure handling of the service. NSSM is useful for binaries
that do not have any kind of Windows service logic built into
them. That is not the case of containerd.
  * Use wrapper functions that run containerd, ctr and criclt
with properly quoted paths to pipes, sockets, state and root dirs.
Currently, if the state and root dirs contain spaces in them, the
command line flags on both Windows and Linux are not properly set.
The wrapper functions will allow us to use the readiness_check
and keepalive functions to retry the commands, while properly
quoting the paths and avoiding eval.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-12-15 14:11:58 +02:00
Derek McGowan
4a569c8894
Check the pid in cri test teardown
Prevent the test from failing when no pid is found
during teardown.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-10-08 13:06:18 -07:00
Claudiu Belu
f42513112f integration: Adds Windows HostProcess tests
Windows HostProcess containers can run containerized workloads on a Windows host.
These containers operate as normal processes but have access to the host network
namespace, storage, and devices when given the appropriate user privileges.

HostProcess containers support the ability to run as one of the following Windows
service accounts: LocalSystem, LocalService, NetworkService.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-07 00:30:28 -07:00
Sebastiaan van Stijn
6c257552a7
scripts: declare ROOT closer to where it's used, and some DRY changes
This also prevents shellcheck from complaining about a possibly
undefined variable.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-03 17:27:03 +02:00
Sebastiaan van Stijn
dba0ef4eb5
scripts: add missing quotes, and minor linting issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-03 17:23:18 +02:00
Claudiu Belu
2f870aa896 integration: Cleanup containerd on test teardown
On Windows, we were only killing the keepalive process, and the
containerd process would keep running.

keepalive and containerd have the same PGID, so we can use that information
to kill both of them.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-01 15:22:43 +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
Davanum Srinivas
9ad087947d
Switch all our tests to version 2
Also warn when someone uses version 1

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-04-12 13:18:33 -04:00
Derek McGowan
7dffdfa560
Move documentation and helper directories out of root
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-01-12 12:19:50 -08:00