Commit Graph

22 Commits

Author SHA1 Message Date
Derek McGowan
1c4be2d883
Move pkg/testutil to internal/testutil
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:57:28 -08:00
Derek McGowan
e59f64792b
Move oci to pkg/oci
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:55:48 -08:00
Derek McGowan
ce41d1c90a
Move services/server to cmd/containerd/server
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:52:48 -08:00
Sebastiaan van Stijn
2af6db672e
switch back from golang.org/x/sys/execabs to os/exec (go1.19)
This is effectively a revert of 2ac9968401, which
switched from os/exec to the golang.org/x/sys/execabs package to mitigate
security issues (mainly on Windows) with lookups resolving to binaries in the
current directory.

from the go1.19 release notes https://go.dev/doc/go1.19#os-exec-path

> ## PATH lookups
>
> Command and LookPath no longer allow results from a PATH search to be found
> relative to the current directory. This removes a common source of security
> problems but may also break existing programs that depend on using, say,
> exec.Command("prog") to run a binary named prog (or, on Windows, prog.exe) in
> the current directory. See the os/exec package documentation for information
> about how best to update such programs.
>
> On Windows, Command and LookPath now respect the NoDefaultCurrentDirectoryInExePath
> environment variable, making it possible to disable the default implicit search
> of “.” in PATH lookups on Windows systems.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-02 21:15:40 +01:00
Derek McGowan
261e01c2ac
Move client to subpackage
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-01 10:37:00 -07:00
Derek McGowan
5fdf55e493
Update go module to github.com/containerd/containerd/v2
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-29 20:52:21 -07:00
Derek McGowan
abfc8be530
Fix lint in integration/client
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-27 22:32:44 -07:00
Derek McGowan
650148313c
Add warning log for unknown config fields
Add error log for failure to parse toml

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-24 20:50:54 -07:00
Iceber Gu
76778aee64 integration: add restart monitor test for paused task
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-15 14:32:17 +08:00
Akihiro Suda
b61988670c
go.mod: github.com/containerd/typeurl/v2 v2.1.0
Changes: https://github.com/containerd/typeurl/compare/7f6e6d160d67...v2.1.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-02-11 23:39:52 +09:00
Sebastiaan van Stijn
29c7fc9520
clean-up "nolint" comments, remove unused ones
- fix "nolint" comments to be in the correct format (`//nolint:<linters>[,<linter>`
  no leading space, required colon (`:`) and linters.
- remove "nolint" comments for errcheck, which is disabled in our config.
- remove "nolint" comments that were no longer needed (nolintlint).
- where known, add a comment describing why a "nolint" was applied.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-12 14:40:59 +02:00
Sebastiaan van Stijn
2e677c9329
sys: move ForceRemoveAll to integration/client
ForceRemoveAll was only used in tests/fuzzing, but added hcsshim as dependency
for the sys package. Moving this to integration/client makes the "sys" package
slightly more lightweight, and may help simplifying dependency-management.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-30 17:39:18 +02:00
Kazuyoshi Kato
7a834516f6 Share images between TestRestartMonitor and TestRestartMonitorWithOnFailurePolicy
These tests are launching containerd and pulling busybox there, while
other tests are using busybox from TestMain().

This commit shares busybox at least between TestRestartMonitor and
TestRestartMonitorWithOnFailurePolicy to reduce the chance of
throttling from ghcr.io.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-05-04 16:50:19 +00:00
Ye Sijun
3df7674058 add restart policy for enhanced restart manager
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2022-04-09 01:04:11 +08:00
Eng Zer Jun
18ec2761c0
test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-03-15 14:03:50 +08:00
Gabriel Adrian Samfira
b63000c65d
[Windows][Integration] Enable TestRestartMonitor
With the release of hcsshim v0.9.2, this test should pass without
issues on Windows.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-02-04 17:27:14 +02:00
Derek McGowan
552a27081c
Disable restart monitor test in Windows
Skip this test until this error can be evaluated and the appropriate
test fix or environment configuration can be determined.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-12-10 11:43:23 -08:00
Derek McGowan
807213fd32
Update restart monitor test to output daemon logs on failure
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-12-09 11:45:37 -08:00
Derek McGowan
bae0d88ae7
Add error logging on cleanup
Check the errors for task and container deletion during restart test
cleanup.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-12-02 11:47:14 -08:00
Derek McGowan
54c0cdae60
Update TestRestartMonitor expected time check
Use the time for the last non-running status to determine
whether the restart did not occur as expected. The
current timestamp only accounts for when the running
status was seen, however, the restart would have always
occurred in between the previous check and latest check.
Therefore, it makes more sense to use the previous check
to determine whether a failure was seen from the restart
monitor not restarting as expected.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-11-04 09:42:58 -07:00
David Porter
9bfec3980b test: Add grace period for restart monitor test
restart monitor test was failing due to occasionally taking past the
deadline on windows tests. Add a small additional grace period to
deflake the test.

Signed-off-by: David Porter <porterdavid@google.com>
2021-11-03 14:07:11 -07:00
Claudiu Belu
830b3c26ec integration: Enable some tests for Windows (part 2)
Some of the tests that are currently running only on Linux can be made
to run on Windows with a few changes.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-10-07 08:13:01 -07:00