Skip to content

Commit b8cc610

Browse files
discovery: address follow-up review feedback
1 parent 3f8728e commit b8cc610

File tree

6 files changed

+26
-92
lines changed

6 files changed

+26
-92
lines changed

pkg/discovery/module/comm_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This product includes software developed at Datadog (https://www.datadoghq.com/).
44
// Copyright 2024-present Datadog, Inc.
55

6-
//go:build test && linux_bpf
6+
//go:build test && linux_bpf && (!dd_discovery_rust || !cgo)
77

88
package module
99

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed
2+
// under the Apache License Version 2.0.
3+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
// Copyright 2024-present Datadog, Inc.
5+
6+
//go:build test && linux_bpf
7+
8+
package module
9+
10+
import (
11+
"testing"
12+
13+
"github.com/stretchr/testify/suite"
14+
)
15+
16+
func TestDiscovery(t *testing.T) {
17+
t.Run("module", func(t *testing.T) {
18+
suite.Run(t, &discoveryTestSuite{setupModule: setupDiscoveryModule})
19+
})
20+
t.Run("system-probe-lite", func(t *testing.T) {
21+
suite.Run(t, &discoveryTestSuite{setupModule: setupRustDiscoveryModule})
22+
})
23+
}

pkg/discovery/module/impl_services_rust_linux_test.go

Lines changed: 0 additions & 80 deletions
This file was deleted.

pkg/discovery/module/impl_services_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
// This doesn't need BPF, but it's built with this tag to only run with
77
// system-probe tests.
8-
//go:build test && linux_bpf && (!dd_discovery_rust || !cgo)
8+
//go:build test && linux_bpf
99

1010
package module
1111

pkg/discovery/module/rust/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ rust_test(
188188
name = "fallback_integration_test",
189189
srcs = ["tests/fallback_integration_test.rs"],
190190
data = [
191-
"//pkg/discovery/module/rust/testdata:mock_system_probe",
192191
":system-probe-lite",
192+
"//pkg/discovery/module/rust/testdata:mock_system_probe",
193193
],
194194
edition = "2024",
195195
# Set compile-time environment variable pointing to system-probe-lite binary

pkg/discovery/module/test_helpers_linux_test.go renamed to pkg/discovery/module/test_helpers.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,6 @@ func (s *discoveryTestSuite) SetupTest() {
178178
s.discovery = s.setupModule(s.T())
179179
}
180180

181-
func TestDiscovery(t *testing.T) {
182-
t.Run("go", func(t *testing.T) {
183-
suite.Run(t, &discoveryTestSuite{setupModule: setupGoDiscoveryModule})
184-
})
185-
t.Run("rust", func(t *testing.T) {
186-
suite.Run(t, &discoveryTestSuite{setupModule: setupRustDiscoveryModule})
187-
})
188-
}
189-
190181
func newDiscovery() *discovery {
191182
mod, err := NewDiscoveryModule(nil, module.FactoryDependencies{})
192183
if err != nil {

0 commit comments

Comments
 (0)