Skip to content

Commit

Permalink
fix(validate-script): make max flow item object length 2 for socketio
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardobridge committed Sep 19, 2023
1 parent 6f26316 commit 8b3f035
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/artillery/lib/util/validate-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ const flowItemSchema = Joi.object({
count: Joi.alternatives(Joi.number(), Joi.string()),
over: Joi.alternatives(Joi.array(), Joi.string())
}),
otherwise: Joi.object().length(1)
otherwise: Joi.when('...engine', {
is: Joi.exist().valid('socketio'),
then: Joi.object().max(2),
otherwise: Joi.object().length(1)
})
});

const scenarioItem = Joi.object({
Expand Down

0 comments on commit 8b3f035

Please sign in to comment.