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)
Mon, Dec 23, 8:40 AM
Unknown Object (File)
Thu, Dec 19, 11:47 PM
Unknown Object (File)
Sun, Dec 15, 9:36 PM
Unknown Object (File)
Sun, Dec 15, 9:36 PM
Unknown Object (File)
Sun, Dec 15, 9:36 PM
Unknown Object (File)
Sun, Dec 15, 9:35 PM
Unknown Object (File)
Sun, Dec 15, 9:17 PM
Unknown Object (File)
Fri, Nov 29, 8:13 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