Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
samsondav committed Dec 17, 2024
1 parent 4b44031 commit f9e6c10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/services/streams/stream_registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ result1 [type=memo value="900.0022" streamID=100];
// errors with unparseable pipeline
err = sr.Register(job.Job{ID: 101, Type: job.Stream, PipelineSpec: &pipeline.Spec{ID: 33, DotDagSource: "source"}}, nil)
require.Error(t, err)
assert.EqualError(t, err, "cannot register job with ID: 101; unparseable pipeline: UnmarshalTaskFromMap: unknown task type: \"\"")
require.EqualError(t, err, "cannot register job with ID: 101; unparseable pipeline: UnmarshalTaskFromMap: unknown task type: \"\"")

// errors when attempt to re-register a stream with an existing streamID at top-level
err = sr.Register(job.Job{ID: 101, StreamID: ptr(StreamID(3)), Type: job.Stream, PipelineSpec: &pipeline.Spec{ID: 33, DotDagSource: `
Expand All @@ -123,7 +123,7 @@ result2 -> result2_parse;
result3 -> result3_parse -> multiply3;
`}}, nil)
require.Error(t, err)
assert.EqualError(t, err, "cannot register job with ID: 101; stream id 3 is already registered")
require.EqualError(t, err, "cannot register job with ID: 101; stream id 3 is already registered")

// errors when attempt to re-register a stream with an existing streamID in DAG
err = sr.Register(job.Job{ID: 101, StreamID: ptr(StreamID(4)), Type: job.Stream, PipelineSpec: &pipeline.Spec{ID: 33, DotDagSource: `
Expand All @@ -139,7 +139,7 @@ result2 -> result2_parse;
result3 -> result3_parse -> multiply3;
`}}, nil)
require.Error(t, err)
assert.EqualError(t, err, "cannot register job with ID: 101; stream id 1 is already registered")
require.EqualError(t, err, "cannot register job with ID: 101; stream id 1 is already registered")

// registers new job with all new stream IDs
err = sr.Register(job.Job{ID: 101, StreamID: ptr(StreamID(4)), Type: job.Stream, PipelineSpec: &pipeline.Spec{ID: 33, DotDagSource: `
Expand Down

0 comments on commit f9e6c10

Please sign in to comment.