Commit Graph

73 Commits (b92a6170cf1413f37b51b0a874ba8216746b30ba)

Author SHA1 Message Date
Tonis Tiigi dc21885891 hack: enable more linters
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-19 12:20:30 -08:00
Erik Sipsma abf373a3b6 cache: Disable overlay diff for native snapshotter
Before this change, test cases were running with an env var that forces
the overlay differ to be on even when the native snapshotter was being
used, which resulted in failures. Now, that env var is skipped when
using the native snapshotter.

Additionally, this includes a related change to skip even trying to use
the overlay differ when the native snapshotter is in use. Previously,
the blob creation code first tried to use the overlay differ and then
failed and fell back to the double-walking differ. Now, it just jumps
right to the double-walking differ when the native snapshotter is in
use.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2021-12-09 21:02:44 -08:00
Erik Sipsma 2bfad4b0dc Change integration.Test from a func to a interface
Using an interface instead of a func is more flexible while achieving
the same effect. It allows you to succintly define a large number of
test cases as structs, as is common in table-driven testing.

A helper func is added that converts the existing test funcs into the
interface, so the change is fairly seamless.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2021-12-09 20:35:48 -08:00
CrazyMax 54b8ff2fc8
go fmt: add //go:build
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-28 13:26:43 +02:00
Kohei Tokunaga d586efd5db Compute diff from the upper dir of overlayfs-based snapshotter
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-09-02 17:58:12 +09:00
Koichi Shiraishi 671ae38fb7
all: unify the specs-go package import alias to ocispecs
ocispecs means "O"pen "C"ontainer "I"nitiative image-spec/"specs"-go/v1
                      opencontainers          /image-spec/specs-go/v1

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2021-08-11 08:29:09 +09:00
Tonis Tiigi c773a215c1 integration: add common context base to all integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-18 20:49:49 -07:00
Tonis Tiigi 19453d5acc test: fix mirror cache handling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-07 18:59:32 -07:00
Akihiro Suda b77f42c611
testutil: fix specifying shim binary
The `plugins.linux.shim` section in the `config.toml` in the previous code
is meaningless for runtime v2.

For runtime v2, we need to just override `$PATH` to ensure the shim
binary path.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-09 15:39:51 +09:00
ktock cf3d695cc2 Enable to run integration tests with stargz snapshotter
Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2020-09-03 16:52:21 +09:00
ktock 76189201a8 Add integration test for containerd and stargz snapshotter
Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2020-08-27 15:50:11 +09:00
Tonis Tiigi 942c39adfd add testing for containerd 1.4-beta2
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-28 18:13:15 -07:00
Paul "TBBle" Hampson f617b0828a Fix testutil/integration build on Windows
Although we don't run any integration tests on Windows at this time,
this does mean that the SKIP_INTEGRATION_TESTS env-var works, so we can
run a wider range of non-integration tests without spurious failures.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 13:50:48 +10:00
Tonis Tiigi 9cb0654ce4 integration: lock buffer for concurrent writes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-23 12:04:14 -07:00
Tonis Tiigi c8190b1518 lint: enable golint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:24 -07:00
Tonis Tiigi 04233f90b3 replace gometalinter with golangci linter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-18 08:13:48 -07:00
Tonis Tiigi 55e29c1abe integration: fix rootless worker binaries closing after tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-17 19:30:40 -07:00
Tonis Tiigi 8247b7b50b integration: increase timeouts
Set the limit high enough to ensure failure in CI
signals a bug

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-17 19:30:40 -07:00
Tonis Tiigi adb68c2764 integration: add concurrent sandbox limit
Default parallelization seems off in CI

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-17 19:30:33 -07:00
Tõnis Tiigi 919ee62a78
Merge pull request #1574 from sipsma/fix-containerd-test
Use new containerd shim in integ tests; don't skip on requirement error.
2020-07-16 11:26:45 -07:00
Erik Sipsma f828f65516 Use new containerd shim in integ tests; don't skip on require error.
A recent change updated the containerd shim built for integ tests to the newer
v2, but the integ test code itself was still hardcoded to look for the older
shim binary and, when that binary wasn't found, skip running the test. This
caused all containerd tests to be skipped.

The fix here updates the binary name to v2 and also removes the branch that
will skip a test when the requirements check fails.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-07-16 10:21:21 -07:00
Paul "TBBle" Hampson 7369864344 Move printLogs from oci.go to sandbox.go
It's not OCI-specific, so it makes more sense in the file that exports
it to the world.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-17 02:35:16 +10:00
Erik Sipsma 463ec47ba0 client test: Fix check for whether sandbox has containerd
Before this, the check was always returning that containerd wasn't running and
thus skipping the rest of several test cases.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-06-21 20:42:53 -07:00
Tonis Tiigi cc88b8f4f4 increase test context timeouts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-06 15:48:55 -07:00
Tonis Tiigi 37b8832d00 upgrade errors checks to Is()
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-18 22:53:38 -07:00
Tonis Tiigi d64e417b1c hack: allow testing with dockerd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-08 23:27:20 -07:00
Sam Whited c62983bbde all: run integration tests against dockerd
Signed-off-by: Sam Whited <sam@samwhited.com>
2020-04-08 23:27:17 -07:00
Akihiro Suda 5938170b84 hack: rename Dockerfiles
Fix https://github.com/moby/buildkit/issues/1208

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-10-18 17:21:48 +09:00
Akihiro Suda e2ea141383 hack: remove legacy Dockerfile
Fix #1022

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-10-13 00:10:27 +09:00
Sam Whited e90be385b4 all: factor only required methods out of Sandbox
Signed-off-by: Sam Whited <sam@samwhited.com>
2019-08-27 16:54:20 -05:00
Sam Whited 93687ae5bf util/testutil/integration: s/TestConf/testConf/
Signed-off-by: Sam Whited <sam@samwhited.com>
2019-08-26 07:56:33 -05:00
Tonis Tiigi b407790852 update containerd daemon to 1.2.7 and old to 1.1.7
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-20 17:02:43 -07:00
Akihiro Suda a545b2dd5b
Merge pull request #1120 from tonistiigi/ci-caching
Use buildkit cache and parallelization in CI
2019-08-21 08:21:11 +09:00
Tonis Tiigi 2cea1107d6 travis: add ci caching
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-17 09:13:06 -07:00
Tonis Tiigi b8284301fd integration: detect double released and leaked mountpoints
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-16 08:03:26 -07:00
Tonis Tiigi e38512c056 testutil: add logs printing on error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-12 11:00:07 -07:00
Tonis Tiigi e7759a861b client: add cni network tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-10 18:00:06 -07:00
zabio3 be2691d06c using raw string literal
regular expressions have their own escape sequences, raw strings can improve their readability.
Signed-off-by: Tomohiro Kusumoto <zabio1192@gmail.com>
2019-06-30 12:24:25 +09:00
Tõnis Tiigi 758c61e873
Merge pull request #570 from kunalkushwaha/entirlement-revised
security entitlement support
2019-03-28 16:14:06 -07:00
Tonis Tiigi 01a8de7d74 integration: secmode switch support and security testcase
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2019-03-27 13:57:03 +09:00
Tonis Tiigi 7e52b33bf8 integration: generalize pkg
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-21 23:49:08 -07:00
Tonis Tiigi aece2ac1aa integration: disable gc
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-10 23:45:48 -07:00
Tonis Tiigi 88c81ee6d5 testutil: use different containerd debug sock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-16 19:46:31 -07:00
Tonis Tiigi 1be3e43527 testutil: add testing a random worker
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-15 22:27:13 -07:00
Tonis Tiigi 706fa2556a dockerfile: add testing external dockerfile features
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-15 22:27:07 -07:00
Tonis Tiigi 1f51f5ea11 testutil: avoid excessive daemons in integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-11 16:47:35 -07:00
Tonis Tiigi 43bd294446 integration: add setsid for sigterm
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-10 23:26:36 -07:00
Tonis Tiigi 8360d73946 testutil: avoid overriding cleanup to nil on error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-05 17:21:34 -07:00
Tonis Tiigi a75983ddb9 integration: pass mirrored images from test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-18 22:07:38 -07:00
Tonis Tiigi a0d7ed9da0 integration: add passing matrices of options
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-18 22:07:38 -07:00