Compare commits

...

2 Commits

Author SHA1 Message Date
Ankit Nayan
4f6aa4f7d1 fix: util tests to allow single step in funnel 2025-07-07 16:58:57 +05:30
Ankit Nayan
861affa98e fix: removing the check mandating 2 steps needed to create a funnel 2025-07-07 16:45:36 +05:30
2 changed files with 5 additions and 5 deletions

View File

@@ -27,9 +27,9 @@ func ValidateTimestampIsMilliseconds(timestamp int64) bool {
}
func ValidateFunnelSteps(steps []*FunnelStep) error {
if len(steps) < 2 {
return fmt.Errorf("funnel must have at least 2 steps")
}
// if len(steps) < 2 {
// return fmt.Errorf("funnel must have at least 2 steps")
// }
for i, step := range steps {
if step.ServiceName == "" {

View File

@@ -114,7 +114,7 @@ func TestValidateFunnelSteps(t *testing.T) {
expectError: false,
},
{
name: "too few steps",
name: "single step is valid",
steps: []*FunnelStep{
{
ID: valuer.GenerateUUID(),
@@ -124,7 +124,7 @@ func TestValidateFunnelSteps(t *testing.T) {
Order: 1,
},
},
expectError: true,
expectError: false,
},
{
name: "missing service name",