Skip to content

Commit

Permalink
Update command_line_args_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya1702 committed Jul 24, 2023
1 parent e8ed7fb commit 075f00a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ func TestIngestionFilteringAlwaysDefaultingToTrue(t *testing.T) {
}

func TestDeprecatedOutputForIngestionFilteringFlag(t *testing.T) {
originalStderr := os.Stderr
r, w, _ := os.Pipe()
os.Stdout = w
stdLog.SetOutput(os.Stdout)
os.Stderr = w
stdLog.SetOutput(os.Stderr)

test := NewParameterTest(t, map[string]string{"exp-enable-ingestion-filtering": "false"})
if innerErr := test.StartHorizon(); innerErr != nil {
Expand All @@ -57,6 +58,8 @@ func TestDeprecatedOutputForIngestionFilteringFlag(t *testing.T) {

outputBytes, _ := io.ReadAll(r)
wg.Wait() // Wait for the goroutine to finish before proceeding
_ = r.Close()
os.Stderr = originalStderr

assert.Contains(t, string(outputBytes), "DEPRECATED - No ingestion filter rules are defined by default, which equates to "+
"no filtering of historical data. If you have never added filter rules to this deployment, then nothing further needed. "+
Expand Down

0 comments on commit 075f00a

Please sign in to comment.