mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-22 07:01:12 +02:00
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>
27 lines
330 B
Bash
Executable File
27 lines
330 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
CGO_ENABLED=1
|
|
|
|
perform_tests() {
|
|
echo "Performing tests"
|
|
go test -v -covermode=atomic -coverprofile=artifacts/coverage.txt ./...
|
|
}
|
|
|
|
perform_short_tests() {
|
|
echo "Performing short tests"
|
|
go test -v -short ./...
|
|
}
|
|
|
|
case $1 in
|
|
--short)
|
|
perform_short_tests
|
|
;;
|
|
*)
|
|
perform_tests
|
|
;;
|
|
esac
|
|
|
|
exit 0
|