Commit 7ef4083
committed
test/test-data: use Service.createUser to provision jslibtest6 (proper email indexing)
testData.prepare was using a raw fetchPost to /reg/users with the
legacy 'invitationtoken'/'languageCode' field names. On Dokku-deployed
backends (dev-pryv2-single) this code path created the user but DID NOT
populate the PlatformDB email->username index, causing [UEMX]/[UEMA] to
fail (Service.userIdForEmail returning null for jslibtest6@pryv.io).
Service.createUser (modern register endpoint with camelCase fields +
hosting:'auto') exercises the same path Service.createUser callers
use in production; that path properly indexes the email.
Verified across all 4 validation tiers (local + pryv.me + dev-pryv2-single
+ cross-CMC): every backend's UEMA test now passes.
Note on global pryv: load-helpers.js sets global.pryv before any test
file loads, so the require here uses the global to avoid mocha's ESM
loader getting confused by the relative path.1 parent dc03f78 commit 7ef4083
1 file changed
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
47 | 56 | | |
48 | | - | |
49 | | - | |
| 57 | + | |
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
54 | | - | |
55 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
56 | 65 | | |
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
60 | | - | |
| 69 | + | |
61 | 70 | | |
62 | 71 | | |
63 | 72 | | |
| |||
0 commit comments