mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
systemd: Add unit test cases
The tests cover `SystemdClient` and methods from `utils` mods. Please note that the `SystemdClient` tests do not run well in parallel, but work well in sequence. Please run them with `--test-threads=1`. Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
This commit is contained in:
14
Makefile
14
Makefile
@@ -20,8 +20,18 @@ build: debug
|
||||
#
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
cargo test -- --color always --nocapture
|
||||
test: test-systemd
|
||||
cargo test -- --color always --nocapture \
|
||||
--skip systemd::dbus::client::tests
|
||||
|
||||
.PHONY: test-systemd
|
||||
# Tests that manipulate cgroups should run in sequence, so that
|
||||
# `--test-threads=1` is used.
|
||||
test-systemd:
|
||||
cargo test --package cgroups-rs --lib \
|
||||
-- systemd::dbus::client::tests \
|
||||
--color always --nocapture \
|
||||
--test-threads=1
|
||||
|
||||
.PHONY: check
|
||||
check: fmt clippy
|
||||
|
||||
Reference in New Issue
Block a user