1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Common test utilities for integration tests.
//!
//! Thin shim over `nlink::lab` so existing integration tests keep
//! working without import changes while the shared helpers live in
//! the public `lab` module.
pub use LabNamespace as TestNamespace;
/// Check if running as root.
/// Skip the test if not running as root.
///
/// Use this at the beginning of integration tests that require root privileges.
///
/// Per Plan 174 — also initializes a `tracing-subscriber` (via
/// [`nlink::lab::init_test_tracing`]) so the lib's
/// `#[tracing::instrument]` spans surface in CI logs. Equivalent to
/// `nlink::require_root!()`; both paths feed through the same
/// subscriber-init helper.
/// Skip the test if not running as root (for non-Result functions).