diff --git a/pkg/pipeline/ingest/ingest_synthetic_test.go b/pkg/pipeline/ingest/ingest_synthetic_test.go index 1fdda4d1c..aa2a20d42 100644 --- a/pkg/pipeline/ingest/ingest_synthetic_test.go +++ b/pkg/pipeline/ingest/ingest_synthetic_test.go @@ -26,6 +26,20 @@ import ( ) func TestIngestSynthetic(t *testing.T) { + // check default values + params := config.StageParam{ + Ingest: &config.Ingest{ + Type: "synthetic", + Synthetic: &api.IngestSynthetic{}, + }, + } + ingest, err := NewIngestSynthetic(params) + syn := ingest.(*IngestSynthetic) + require.NoError(t, err) + require.Equal(t, defaultBatchLen, syn.params.BatchMaxLen) + require.Equal(t, defaultConnections, syn.params.Connections) + require.Equal(t, defaultFlowLogsPerMin, syn.params.FlowLogsPerMin) + batchMaxLen := 3 connections := 20 flowLogsPerMin := 1000 @@ -34,14 +48,14 @@ func TestIngestSynthetic(t *testing.T) { Connections: connections, FlowLogsPerMin: flowLogsPerMin, } - params := config.StageParam{ + params = config.StageParam{ Ingest: &config.Ingest{ Type: "synthetic", Synthetic: &synthetic, }, } - ingest, err := NewIngestSynthetic(params) - syn := ingest.(*IngestSynthetic) + ingest, err = NewIngestSynthetic(params) + syn = ingest.(*IngestSynthetic) require.NoError(t, err) require.Equal(t, batchMaxLen, syn.params.BatchMaxLen) require.Equal(t, connections, syn.params.Connections)