Skip to content

Commit

Permalink
#RI-3063-fix IT
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirAllayarovSofteq committed Jun 23, 2022
1 parent 3e88d95 commit c1e384d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -185,15 +185,15 @@ describe('POST /instance/:instanceId/streams/entries', () => {
id: '*',
fields: [
[constants.TEST_STREAM_FIELD_1, constants.TEST_STREAM_FIELD_1],
[constants.TEST_STREAM_FIELD_2, constants.TEST_STREAM_FIELD_2]
[constants.TEST_STREAM_FIELD_2, constants.TEST_STREAM_FIELD_2],
],
},
{
id: '*',
fields: {
[constants.TEST_STREAM_VALUE_1]: constants.TEST_STREAM_VALUE_1,
[constants.TEST_STREAM_VALUE_2]: constants.TEST_STREAM_VALUE_2,
}
fields: [
[constants.TEST_STREAM_FIELD_1, constants.TEST_STREAM_FIELD_1],
[constants.TEST_STREAM_FIELD_2, constants.TEST_STREAM_FIELD_2]
],
},
]
},
Expand Down
Expand Up @@ -18,7 +18,7 @@ const endpoint = (instanceId = constants.TEST_INSTANCE_ID) =>

const entrySchema = Joi.object().keys({
id: Joi.string().label('entries.0.id').required(),
fields: Joi.object().label('entries.0.fields').required()
fields: Joi.array().label('entries.0.fields').required()
.messages({
'object.base': '{#label} must be an array',
}),
Expand All @@ -28,7 +28,7 @@ const dataSchema = Joi.object({
keyName: Joi.string().allow('').required(),
entries: Joi.array().items(entrySchema).required().messages({
'array.sparse': 'entries must be either object or array',
'array.base': 'property {#label} must be either object or array',
'array.base': 'property {#label} must be an array',
}),
expire: Joi.number().integer().allow(null).min(1).max(2147483647),
}).strict();
Expand Down

0 comments on commit c1e384d

Please sign in to comment.