Page MenuHomePhabricator

[keyserver] Mark ids in input validators
ClosedPublic

Authored by michal on May 4 2023, 7:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 3:56 PM
Unknown Object (File)
Fri, Apr 12, 4:20 PM
Unknown Object (File)
Wed, Apr 10, 4:19 PM
Unknown Object (File)
Fri, Apr 5, 4:59 AM
Unknown Object (File)
Fri, Apr 5, 4:59 AM
Unknown Object (File)
Fri, Apr 5, 4:59 AM
Unknown Object (File)
Fri, Apr 5, 4:58 AM
Unknown Object (File)
Fri, Apr 5, 4:38 AM
Subscribers

Details

Summary

We will also need to convert ids in the input, so this diff marks the ids for conversion inside existing input validators. tID should behave the same as t.String so there should be no runtime difference.

Depends on D7712

Test Plan

Went through all existing input validators and sub-validators and changed t.String to tID in places where ids should be updated.
Test if the web and mobile app still work.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

michal requested review of this revision.May 4 2023, 8:12 AM
tomek requested changes to this revision.May 5 2023, 12:47 AM

In diffs like this a test plan has to contain a description of what you have done to make sure that all the necessary changes were made. Without this it is impossible to verify that all the changes are there.

This revision now requires changes to proceed.May 5 2023, 12:47 AM
  • Updated the test plan
  • Also converted role ids. This required the conversion logic to handle tComb refinements, so I added that and tests
tomek added inline comments.
keyserver/src/utils/validation-utils.test.js
110 ↗(On Diff #26151)

Role value can be -1 - should we add a test for it?

This revision is now accepted and ready to land.May 8 2023, 3:01 AM
keyserver/src/utils/validation-utils.test.js
110 ↗(On Diff #26151)

I have tests with -1 role id in responder-validators.test.js