File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 'start_commands' : [
2020 'apt-get update' ,
2121 'apt-get install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y docker.io' ,
22+ # Remove default binary to ensure the check uses the embedded one
23+ 'rm -f /usr/local/sbin/nfsiostat' ,
2224 ],
2325 'docker_volumes' : ['/var/run/docker.sock:/var/run/docker.sock' ],
2426}
2527
28+ CONFIG_BUNDLED_BINARY = {
29+ "init_config" : {},
30+ "instances" : [{}],
31+ }
32+
2633METRICS = [
2734 'system.nfs.ops' ,
2835 'system.nfs.rpc_bklog' ,
Original file line number Diff line number Diff line change 55
66from datadog_checks .dev .utils import get_metadata_metrics
77
8- from .common import CONFIG , METRICS
8+ from .common import CONFIG , CONFIG_BUNDLED_BINARY , METRICS
99
1010
1111@pytest .mark .e2e
@@ -17,3 +17,11 @@ def test_e2e(dd_agent_check):
1717
1818 aggregator .assert_all_metrics_covered ()
1919 aggregator .assert_metrics_using_metadata (get_metadata_metrics ())
20+
21+
22+ @pytest .mark .e2e
23+ def test_e2e_bundled_binary_no_mounts (dd_agent_check ):
24+ """Verify the agent's bundled nfsiostat binary exists and the check handles no NFS mounts gracefully."""
25+ aggregator = dd_agent_check (CONFIG_BUNDLED_BINARY )
26+
27+ aggregator .assert_all_metrics_covered ()
You can’t perform that action at this time.
0 commit comments