@@ -168,23 +168,12 @@ rust_binary(
168168# Tests
169169# ============================================================================
170170
171- # Test data files
172- filegroup (
173- name = "testdata" ,
174- srcs = glob (["testdata/**/*" ]),
175- )
176-
177- filegroup (
178- name = "mock_system_probe" ,
179- srcs = ["testdata/fallback/mock-system-probe.sh" ],
180- )
181-
182171# Unit tests embedded in source files
183172rust_test (
184173 name = "dd_discovery_test" ,
185174 crate = ":dd_discovery" ,
186175 # Make test data available to tests
187- data = [": testdata" ],
176+ data = ["//pkg/discovery/module/rust/ testdata:files " ],
188177 edition = "2024" ,
189178 deps = [
190179 # Dev dependencies from Cargo.toml
@@ -201,15 +190,15 @@ rust_test(
201190 name = "fallback_integration_test" ,
202191 srcs = ["tests/fallback_integration_test.rs" ],
203192 data = [
204- ":mock_system_probe" ,
193+ "//pkg/discovery/module/rust/testdata :mock_system_probe" ,
205194 ":sd-agent" ,
206195 ],
207196 edition = "2024" ,
208197 # Set compile-time environment variable pointing to sd-agent binary
209198 # This mimics Cargo's CARGO_BIN_EXE_* behavior
210199 rustc_env = {
211200 "CARGO_BIN_EXE_sd-agent" : "$(rootpath :sd-agent)" ,
212- "MOCK_SYSTEM_PROBE" : "$(rootpath :mock_system_probe)" ,
201+ "MOCK_SYSTEM_PROBE" : "$(rootpath //pkg/discovery/module/rust/testdata :mock_system_probe)" ,
213202 },
214203 deps = [
215204 "@crates//:nix" ,
0 commit comments