Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Fix integer min/max range schema validation #8743

Merged
merged 3 commits into from
Jul 21, 2023

Conversation

bobanm
Copy link
Contributor

@bobanm bobanm commented Jul 13, 2023

What was the problem?

This PR resolves #8617

How was it solved?

  • Updated definition of uint32 and uint64 formats to include required type: 'number' property
  • Removed definitions of int32 and int64 formats, as they are already included in the default AJV formats
  • Added 10 new test cases
  • BONUS 1: Simplified how Lisk Validator loads custom formats 😎
  • BONUS 2: Simplified how schemas are defined in lisk_validator_formats test suite 😎

How was it tested?

All tests passing 👌🏻

@bobanm bobanm requested review from mosmartin and Incede July 13, 2023 21:10
@bobanm bobanm self-assigned this Jul 13, 2023
@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #8743 (0f27a40) into release/6.0.0 (0f27a40) will not change coverage.
The diff coverage is n/a.

❗ Current head 0f27a40 differs from pull request most recent head 1b9e96f. Consider uploading reports for the commit 1b9e96f to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           release/6.0.0    #8743   +/-   ##
==============================================
  Coverage          83.30%   83.30%           
==============================================
  Files                593      593           
  Lines              22294    22294           
  Branches            3292     3292           
==============================================
  Hits               18573    18573           
  Misses              3721     3721           

@bobanm bobanm requested a review from has5aan July 19, 2023 08:46
@ishantiw ishantiw enabled auto-merge (squash) July 21, 2023 07:30
@ishantiw ishantiw merged commit cd0dcd1 into release/6.0.0 Jul 21, 2023
8 checks passed
@ishantiw ishantiw deleted the 8617-fix-integer-range-schema-validation branch July 21, 2023 07:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants