Skip to content

Commit 0f88ada

Browse files
committed
updated test
1 parent 38a8e29 commit 0f88ada

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

testing/integration/otel_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,11 @@ func validateCommandIsWorking(t *testing.T, ctx context.Context, fixture *aTesti
199199
require.NoError(t, os.WriteFile(cfgFilePath, []byte(fileProcessingConfig), 0600))
200200

201201
// check `elastic-agent otel validate` command works for otel config
202-
out, err := fixture.Exec(ctx, []string{"otel", "validate", "--config", cfgFilePath})
202+
cmd, err := fixture.PrepareAgentCommand(ctx, []string{"otel", "validate", "--config", cfgFilePath})
203+
require.NoError(t, err)
204+
205+
err = cmd.Run()
203206
require.NoError(t, err)
204-
require.Equal(t, 0, len(out)) // no error printed out
205207

206208
// check feature gate works
207209
out, err = fixture.Exec(ctx, []string{"otel", "validate", "--config", cfgFilePath, "--feature-gates", "foo.bar"})

0 commit comments

Comments
 (0)