Skip to content

Commit

Permalink
updated cold phase index priority to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Oct 28, 2020
1 parent c6671c6 commit fba588d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ describe('<EditPolicy />', () => {
const entirePolicy = JSON.parse(JSON.parse(latestRequest.requestBody).body);
expect(entirePolicy.phases.cold).toMatchInlineSnapshot(`
Object {
"actions": Object {},
"actions": Object {
"set_priority": Object {
"priority": 0,
},
},
"min_age": "0d",
}
`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ export const schema: FormSchema<FormInternal> = {
},
set_priority: {
priority: {
defaultValue: '0' as any,
label: i18nTexts.editPolicy.setPriorityFieldLabel,
validations: [{ validator: ifExistsNumberNonNegative }],
serializer: serializers.stringToNumber,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const createIfNumberExistsValidator = ({
return (arg) => {
if (arg.value) {
return numberGreaterThanField({
than: 0,
than,
message,
})({
...arg,
Expand Down

0 comments on commit fba588d

Please sign in to comment.