Commit Graph

16 Commits

Author SHA1 Message Date
Andrey Smirnov
5d5697e398 chore: limit unit-test run concurrency
As we run unit-tests concurrently, it makes sense to limit each run
concurrency.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-12-07 10:46:02 -08:00
Andrey Smirnov
2fb00344ab chore: upgrade Go to 1.14.3 and use toolchain for race detector
With Go 1.14.3 we can run race-enabled code on muslc, so this opens path
to run unit-tests-race under Talos environment with rootfs, enabling all
the tests to run under race detector.

Also fixed the tests run by specifying platform in the test environment.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-05-25 08:35:11 -07:00
Andrey Smirnov
029374f07d chore: disable go test result cache
Go by default caches unit-tests results via build cache, so if source
code doesn't have any changes, test results are cached on package level.
As our unit-tests are not that pure and depend on the environment, it
would be more helpful to make sure all the unit-tests during each build.

Setting number of test runs to one disable test result cache (but build
cache is still being used).

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-08-30 22:03:00 +03:00
Andrey Smirnov
8c59adb9dc chore: allow to run tests only for specified packages
This allows to do `make test TESTPKGS=./internal/app/machined`.

Also update Dockerfile slug as
https://github.com/moby/buildkit/pull/1081 was merged into master.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-23 22:17:22 +03:00
Andrey Smirnov
9f9acf1f05 chore: run tests in the buildkit itself
This relies on two PRs to the buildkit:

* https://github.com/moby/buildkit/pull/1081
* https://github.com/moby/buildkit/pull/1085

Sysfs fix was merged to upstream, so updated tag, while using
`Dockerfile` slug I can switch to dockerfile2llb with support for
`--security=insecure`.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-19 07:53:49 -07:00
Andrew Rynhard
1e9548d149 feat: use new pkgs for initramfs and rootfs
This brings in the newly compiled libraries and binaries from our new
pkg builds.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-15 10:32:29 -07:00
Andrey Smirnov
82fe5b55e5 chore: make unit-tests use isolated instances of containerd
This makes test launch their own isolated instance of containerd with
its own root/state directories and listening socket address. Each test
brings this instance up/down on its own.

Add options to override containerd address in the code (used only in the
tests).

Enable parallel go test runs once again.

P.S. I wish I could share that 'SetupSuite' phase across the tests, but
afaik there's no way in Go to share `_test.go` code across packages. If
we put it as normal package, this might pull in test dependencies (like
`testify`) into production code, which I don't like.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-10 19:46:32 +03:00
Andrew Rynhard
d82444a42d
chore: revert #816 (#829)
This reverts commit 11f8392e53.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-04 08:43:34 -07:00
Andrew Rynhard
11f8392e53
chore: fix GCE image creation (#816)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-03 18:06:47 -07:00
Andrey Smirnov
e86ef87fe8 chore: don't run tests in parallel across packages (#748)
We run tests in parallel mode (`go test -p 4`), default is to run in
parallel in fact. But tests are not isolated, as some of them launch
containerd on a fixed file socket (as socket path is hardcoded in
Talos), and that might lead to any weirdness when tests try to
launch containerd concurrently on the same file socket.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-06-20 16:30:21 -07:00
Andrey Smirnov
4bf649f14c chore: workaround flaky tests (#651)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-13 15:00:59 -07:00
Andrey Smirnov
5c5e56b072 chore: split 'base' target, run tests in docker container (#528)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-04-14 09:27:20 -07:00
Andrey Smirnov
ab0692004d chore: export coverage info from unit-tests (#505)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-04-09 12:21:19 -07:00
Andrew Rynhard
ee7df39925
chore: use buildkitd for builds (#320)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-01-19 01:58:26 -08:00
Andrew Rynhard
1fe14494f0
chore: use the toolchain for go builds (#317)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-01-18 06:26:12 -08:00
Andrew Rynhard
72eb1b34f5
chore: use buildkit for builds (#295) 2018-12-19 22:22:05 -08:00