Skip to content

Commit

Permalink
test: remove invalid cases
Browse files Browse the repository at this point in the history
the removed tests were checking the non-processsample exclusion + FF enabled behavior. Given the non-processsample check is now done elsewhere, these tests are now invalid
  • Loading branch information
DavSanchez committed Nov 5, 2024
1 parent d386f89 commit 303b9bf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
18 changes: 0 additions & 18 deletions internal/agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -818,24 +818,6 @@ func BenchmarkStorePluginOutput(b *testing.B) {
}
}

func Test_ProcessSampling_FeatureFlagIsEnabled(t *testing.T) {
cnf := &config.Config{
IncludeMetricsMatchers: map[string][]string{"process.name": {"some-process"}},
}
someSample := struct {
evenType string
}{
evenType: "ProcessSample",
}
a, _ := NewAgent(cnf, "test", "userAgent", test.NewFFRetrieverReturning(true, true))

// when
actual := a.Context.shouldIncludeEvent(someSample)

// then
assert.Equal(t, true, actual)
}

func getBooleanPtr(val bool) *bool {
return &val
}
Expand Down
10 changes: 0 additions & 10 deletions pkg/metrics/sampler/matcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,16 +534,6 @@ func TestNewSampleMatchFn(t *testing.T) {
args args
include bool
}{
{
name: "non process samples are always included",
args: args{
enableProcessMetrics: &falseVar,
includeMetricsMatchers: emptyMatchers,
ffRetriever: testFF.EmptyFFRetriever,
sample: &fixture.NetworkSample,
},
include: true,
},
{
name: "when enableProcessMetrics is FALSE process samples are always excluded",
args: args{
Expand Down

0 comments on commit 303b9bf

Please sign in to comment.