Pryv.io test results

service-core 1.9.0

Summary

1163tests total
1158✅ passing
6❓ pending
0❌ failing

Date: Wed Jan 17 2024 09:56:56 GMT+0100 (Central European Standard Time)

api-server component

Summary

886tests total
881✅ passing
6❓ pending
0❌ failing

Tests

IdStatusTest
Accesses with account streams POST /accesses When using a personal access to create an access for visible account streams with a read-level permission
UE9Gshould return 201
BUYPshould create access in the database
S3IQshould enable user to read visible stream event with this access
Accesses with account streams POST /accesses When using a personal access to create an access for visible account streams with a read-level permission for the “account” stream
XEAKshould return 201
65I4should create access in the database
L99Lshould allow to access visible events in storageUsed
Accesses with account streams POST /accesses When using a personal access to create an access for visible account streams with a read-level permission for the “storageUsed” stream
EPEPshould return 201
U3UMshould create access in the database
A4UPshould allow to access visible events in storageUsed
Accesses with account streams POST /accesses When using a personal access to create an access for visible account streams with a create-only-level permission
IWMQshould return 201
APYNshould create access in the database
Accesses with account streams POST /accesses When using a personal access to create an access for visible account streams with a contribute-level permission
R0M1should return 201
Q8R8should create access in the database
TI1Xshould allow to create visible stream events
Accesses with account streams POST /accesses When using a personal access to create an access for visible account streams with a manage-level permission
93HOshould return 400
YPHXshould return the correct error
Accesses with account streams POST /accesses When using a personal access to create an access for not visible account streams
ATGUshould return 400
Q2KZshould return the correct error
Accesses with account streams POST /accesses When using a personal access to create an access for unexisting system streams
KKKSshould return 403 forbidden
Accesses with account streams DELETE /accesses When using a personal access to delete an account stream access
Z40Jshould return 200
MP9Tshould delete the access in the database
Accesses access deletions when given a few existing accesses accesses.get
H7ZSaccess should contain tokens and apiEndpoints
P12Lshould contain deletions
BQ7Mcontains active accesses
NVCQcontains deleted accesses as well
6ZQLdeleted access are in UTC (seconds) format
Accesses access deletions when given a few existing accesses accesses.create for a valid access
N3Q1should contain an access
8UOWaccess should contain token and apiEndpoint
J77Zshould contain the set values, but no “deleted” field in the API response
A4JPshould contain the field “deleted:null” in the database
Accesses access deletions when given a few existing accesses accesses.create for a deleted access
1DJ6should return an error
7ZPKerror should say that the deleted field is forbidden upon creation
Accesses access deletions when given a few existing accesses accesses.update
JNJKshould return an error
OS36error should say that the deleted field is forbidden upon update
Accesses Delete app access when deleting an app access that created shared accesses
WE2Oshould return the accessDeletion and relatedDeletions
IVWPshould delete it and the accesses it created, not touching the expired ones
Accesses access expiry when given a few existing accesses accesses.get vanilla version
489Jsucceeds
7NPEcontains only active accesses
Accesses access expiry when given a few existing accesses accesses.get when given the includeExpired=true parameter
PIGEsucceeds
DZHLincludes expired accesses
Accesses access expiry when given a few existing accesses accesses.create when called with expireAfter>0
3ONAcreates an access with set expiry timestamp
Accesses access expiry when given a few existing accesses accesses.create when called with expireAfter=0
8B65creates an expired access
Accesses access expiry when given a few existing accesses accesses.create when called with expireAfter<0 < b>
JHWHfails
Accesses access expiry when given a few existing accesses accesses.create Store accesses
JZWHcreate an access on :dummy: store
JUWHcreate an access :dummy:marcella on :dummy: store
Accesses access expiry when given a few existing accesses accesses.checkApp when the matching access is not expired
B66Breturns the matching access
Accesses access expiry when given a few existing accesses accesses.checkApp when the matching access is expired
DLHJreturns no match
Accesses access expiry when given a few existing accesses other API accesses using an expired access
AJG5fails
KGT4returns a proper error message
Accesses access expiry when given a few existing accesses other API accesses using a valid access
CBRFsucceeds
Accesses access client data when given a few existing accesses accesses.get
KML2succeeds
NY85contains existing accesses with clientData
Accesses access client data when given a few existing accesses accesses.create when called with clientData={}
OMUOcreates an access with empty clientData
Accesses access client data when given a few existing accesses accesses.create when called with clientData=null
E5C1throws a schema error
Accesses access client data when given a few existing accesses accesses.create when called with complex clientData
JYD4creates an access with complex clientData
Accesses access client data when given a few existing accesses accesses.checkApp when the provided clientData matches the existing clientData
U1AMreturns the matching access
Accesses access client data when given a few existing accesses accesses.checkApp when the provided clientData does not match the existing clientData
2EERreturns no match
Accesses access client data when given a few existing accesses accesses.checkApp when no clientData is provided but existing access has one
DHZQreturns no match
Accesses access-info
PH0Kshould return the username
Accesses access-info [APRA] When password rules are enabled
2X82must return password information for personal accesses
Q7J6must not return password information for other accesses
[ACCO] Account with system streams GET /account and when user has multiple events per stream and additional streams events
XRKXshould return 200
JUHRshould return account information in the structure that is defined in system streams and only active values
R5S0should return only visible default stream events
[ACCO] Account with system streams POST /change-password and when valid data is provided
X9VQshould return 200
ACNEshould find password in password history
[ACCO] Account with system streams PUT /account when updating the username
P69Jshould return 400
DBM6should return the correct error
[ACCO] Account with system streams PUT /account when updating non editable fields
90N3should return 400
QHZ4should return the correct error
[ACCO] Account with system streams PUT /account when updating a unique field that is already taken and the field is not unique in mongodb
K3X9should return a 409 error
8TRPshould return the correct error
[ACCO] Account with system streams PUT /account when updating email and language and non-active fields exists
JJ81should return 200
K9ICshould returned updated account data
JQHXshould update only active events in the database
Y6MCShould send a request to service-register to update its user main information and unique fields
Audit logs events GET /events
0BK7must not return null values or trashed=false
VBV0must not return “auth” in “content:query”
R8MSmust escape special characters
Audit logs events GET /audit/logs
RV4Wmust return a valid id field
[FG5R] Events of system streams GET /events When using a personal access
KS6Kshould return visible system events only
[FG5R] Events of system streams GET /events When using a shared access with a read-level permission on the .account stream
DRFHshould return visible system events only
[FG5R] Events of system streams GET /events When using a shared access with a read-level permission on all streams (star) and a visible system stream
GF3Ashould return only the account event for which a permission was explicitely provided
[FG5R] Events of system streams GET /events When using a shared access with a read-level permission on all streams (star)
RM74should not return any system events
[FG5R] Events of system streams GET /events/ When using a personal access to retrieve a visible system event
9IEXshould return 200
IYE6should return the event
[FG5R] Events of system streams GET /events/ When using a personal access to retrieve a non visible system event
Y2OAshould return 403
DHZEshould return the right error message
[FG5R] Events of system streams GET /events/ When using a shared access with a read-level permission on all streams (star) and a visible system stream
YPZXshould return 200
1NRMshould return the event
[FG5R] Events of system streams POST /events When using a personal access to create an editable system event which is non indexed and non unique
F308should return 201
9C2Dshould return the created event
A9DCshould add the ‘active’ streamId to the new event which should be removed from other events of the same stream
[FG5R] Events of system streams POST /events When using a personal access to create an editable system event which is indexed when the new value is valid
8C80should return 201
67F7should return the created event
467Dshould add the ‘active’ streamId to the new event which should be removed from other events of the same stream
199Dshould notify register with the new data
[FG5R] Events of system streams POST /events When using a personal access to create an editable system event which is indexed when the new value is invalid
PQHRshould return 400
[FG5R] Events of system streams POST /events When using a personal access to create an editable system event which is indexed and unique [WCIU] whose content is unique
SQZ2should return 201
YS79should return the created event
DA23should add the ‘active’ streamId to the new event which should be removed from other events of the same stream
D316should notify register with the new data
[FG5R] Events of system streams POST /events When using a personal access to create an editable system event which is indexed and unique whose content is already taken in register
89BCshould return 409
10BCshould return the correct error
[FG5R] Events of system streams POST /events When using a personal access to create an editable system event which is indexed and unique [6B8D] When creating an event that is already taken only on core
2021should return a 409 error
121Eshould return the correct error
[FG5R] Events of system streams POST /events When using a personal access to create a non editable system event
6CE0should return a 400 error
90E6should return the correct error
[FG5R] Events of system streams POST /events when using a shared access with a contribute-level permission on a system stream
X49Rshould return 201
764Ashould return the created event
765Ashould notify register with the new data
[FG5R] Events of system streams POST /events when using a shared access with a manage-level permission on all streams (star)
YX07should return 403
YYU1should return correct error id
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is non indexed and non unique
2FA2should return 200
763Ashould return the updated event
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is non indexed and non unique by adding the “active” streamId
562Ashould return 200
5622should return the updated event
CF70should remove the “active” streamId for events of the same stream
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is non indexed and non unique by changing its steamIds when editing with 2 streamIds at the time
8BFKshould return 400
E3KEshould return the correct error
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is non indexed and non unique by changing its steamIds when substituting a system stream with another one
9004should return 400
E3AEshould return the correct error
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is indexed as register is working when the new value is valid
0RUKshould return 200
E43Mshould notify register with the updated data
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is indexed as register is working when the new value is valid by adding the “active” streamId
0D18should notify register with the updated data
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is indexed as register is working when the new value is invalid
RDZFshould return 400
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is indexed as register is out
AA92should return 500
645Cshould notify register with the updated data
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is unique by updating a unique field that is valid
4BB1should return 200
GWHUshould send a request to service-register to update the unique field
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is unique by updating a unique field that is valid by adding the “active” streamId
HJWEshould return 200
6AATshould notify register with the updated data
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is unique by updating a unique field that is already taken with a field that is not unique in register
F8A8should return 409
5A04should notify register with the updated data
[FG5R] Events of system streams PUT /events/ when using a personal access to update an editable system event which is unique by updating a unique field that is already taken with a field that is not unique in mongodb
5782should return 409
B285should return the correct error
[FG5R] Events of system streams PUT /events/ when using a personal access to update a non editable system event
034Dshould return 400
BB5Fshould return the correct error
[FG5R] Events of system streams PUT /events/ when using a shared access with a contribute-level access on a system stream to update an editable system event
W8PQshould return 200
TFOIshould return the updated event
[FG5R] Events of system streams PUT /events/ when using a shared access with a manage-level permission on all streams (star) to update an editable system event
H1XLshould return 403
7QA3should return the correct error
[FG5R] Events of system streams DELETE /events/ When using a personal access to delete an editable streams event that has no ‘active’ streamId which is unique
43B1should return 200
3E12should return the trashed event
F328should notify register with the deleted data
[FG5R] Events of system streams DELETE /events/ When using a personal access to delete an editable streams event that has no ‘active’ streamId which is indexed
1B70should return 200
CBB9should return the trashed event
[FG5R] Events of system streams DELETE /events/ When using a personal access to delete an editable streams event that has the ‘active’ streamId
10ECshould return 400
D4CAshould return the correct error
[FG5R] Events of system streams DELETE /events/ When using a personal access to delete a non editable system event
8EDBshould return a 400
A727should return the correct error
[FG5R] Events of system streams DELETE /events/ when using a shared access with a contribute-level access on a system stream
I1I1should return 200
UFLTshould return the updated event
[FG5R] Events of system streams DELETE /events/ when using a shared access with a manage-level permission on all streams (star)
AT1Eshould return 403
FV8Wshould return the correct error
Backward-compatibility Tags as prefixed streams when the stream associated to the tag exists when creating an event
V39Lmust create the event with the streamIds translated from tags
Backward-compatibility Tags as prefixed streams when the stream associated to the tag does not exist when creating an event
OMGXmust create the streams with the streamId translated from tags and adapt the event as accordingly
Backward-compatibility Tags as prefixed streams when the stream associated to the tag does not exist when updating an event
NWQ6must create the streams with the streamId translated from tags and adapt the event as accordingly
Backward-compatibility Tags as prefixed streams when fetching events
R3NUshould return the event with its tags
Backward-compatibility System stream id prefx Account streams reserved words
4L48Can create an “account” stream, and add event to it
Backward-compatibility System stream id prefx events
Q40Imust return old prefixes in events.get
4YCDmust accept old prefixes in events.get
CF3Nmust return old prefixes in events.getOne (including history)
U28Cmust accept old prefixes in events.create
YIWXmust return old prefixes in events.update
75DNmust return old prefixes in events.delete
Backward-compatibility System stream id prefx streams
WY07must return old prefixes in streams.get
YJS6must accept old prefixes in streams.get
CCE8must handle old prefixes in streams.create
4DP2must accept old prefixes in streams.update
LQ5Xmust return old prefixes in streams.delete
Backward-compatibility System stream id prefx accesses
UDJFmust return old prefixes in accesses.get
DWWDmust accept old prefixes in accesses.create
Backward-compatibility System stream id prefx when disabling backward compatibility using the header param to use new prefixes events
CZN1must return new prefixes in events.get
SHW1must accept new prefixes in events.get
6N5Bmust return new prefixes in events.getOne (including history)
65U8must accept new prefixes in events.create
CSKFmust return new prefixes in events.update
4IEXmust return new prefixes in events.delete
Backward-compatibility System stream id prefx when disabling backward compatibility using the header param to use new prefixes streams
O7RDmust return new prefixes in streams.get
VMH7must accept new prefixes in streams.get
6EFGmust handle new prefixes in streams.create
LVOFmust accept new prefixes in streams.update
C73Rmust return new prefixes in streams.delete
Backward-compatibility System stream id prefx when disabling backward compatibility using the header param to use new prefixes accesses
O9OHmust return new prefixes in accesses.get
GFRTmust accept new prefixes in accesses.create
System streams GET /streams When using a personal access
9CGOShould return all streams - including system ones
System streams POST /streams When using a personal access to create a child to a system stream
GRI4should return status 400
XP07should return the correct error
System streams PUT /streams/ When using a personal access to update a system stream
SLIRshould return status 400
V6HCshould return the correct error
System streams DELETE /streams/ When using a personal access to delete a system stream
1R35should return status 400
4939should return the correct error
[ACCP] accesses (app) GET /
YEHWmust return shared accesses whose permissions are a subset of the current one’s
GLHPmust be forbidden to requests with a shared access token
[ACCP] accesses (app) POST /
QVHSmust create a new shared access with the sent data and return it
6GR1must forbid trying to create a non-shared access
A4MCmust forbid trying to create an access with greater permissions
QN6Dmust return a correct error if the sent data is badly formatted
4HAEmust allow creation of shared accesses with an access that has superior permission on root stream (*)
[ACCP] accesses (app) PUT /
11UZmust return a 410 (Gone)
[ACCP] accesses (app) DELETE /
5BOOmust delete the shared access
ZTSXforbid deletion of already deleted for AppTokens
VGQSmust forbid trying to delete a non-shared access
ZTSYmust forbid trying to delete an access that was not created by itself
J32Pmust return a correct error if the access does not exist
Accesses (personal) GET /
K5BFmust return all accesses (including personal ones)
Accesses (personal) POST /
BU9Umust create a new shared access with the sent data, returning it
FPUEmust create a new app access with the sent data, creating/restoring requested streams
865Imust accept two app accesses with the same name (app ids) but different device names
4Y3Ymust ignore erroneous requests to create new streams
WSG8must fail if a stream similar to that requested for creation already exists
GVC7must refuse to create new personal accesses (obtained via login only)
YRNEmust slugify the new access’ predefined token
00Y3must return an error if a permission’s streamId has an invalid format
V3AVmust return an error if the sent data is badly formatted
HETKmust refuse empty defaultName values for streams
YG81must return an error if an access with the same token already exists
GZTHmust return an error if an access with the same name already exists
4HO6must return an error if an “app” access with the same name (app id) and device name already exists
PO0Rmust return an error if the device name is set for a non-app access
RWGGmust return an error if the given predefined access’s token is a reserved word
08SKmust return an error if the permission streamId has invalid characters
Accesses (personal) PUT /
U04Amust return a 410 (Gone)
Accesses (personal) DELETE /
S8EKmust delete the shared access
5GBImust delete the personal access
NN11must return an error if the access does not exist
Accesses (personal) POST /check-app
VCH9must return the adjusted permissions structure if no access exists
R8H5must accept requested permissions with store “:dummy:” and adapt to correct name
R8H4must accept requested permissions with “*” for “all streams”
9QNKmust return the existing app access if matching
IF33must also return the token of the existing mismatching access if any
G5T2must propose fixes to duplicate ids of streams and signal an error when appropriate
MTY1must return an error if the sent data is badly formatted
U5KDmust be forbidden to non-personal accesses
[ACCO] account GET /
PHSBmust return the user’s account details
K5EImust be forbidden to non-personal accesses
[ACCO] account PUT /
0PPVmust modify account details with the sent data, notifying register if e-mail changed
AT0Vmust return a correct error if the sent data is badly formatted
NZE2must be forbidden to non-personal accesses
[ACCO] account storage space monitoring
NFJQmust properly compute used storage size for a given user when called
Y445must properly compute storage size for all users in nightly script
0QVHmust be approximately updated (diff) when adding an attached file
93APmust be approximately updated (diff) when deleting an attached file
5WO0must be approximately updated (diff) when deleting an event
[ACCO] account /change-password
6041must change the password to the given value
STWHmust return an error if the given old password does not match
8I1Nmust return a correct error if the sent data is badly formatted
J5VHmust be forbidden to non-personal accesses
[ACCO] account /change-password [APWD] When password rules are enabled Complexity rules:
1YPTmust return an error if the new password is too short
352Rmust accept the new password if it is long enough
663Amust return an error if the new password does not contains characters from enough categories
OY2Gmust accept the new password if it contains characters from enough categories
[ACCO] account /change-password [APWD] When password rules are enabled Reuse rules:
AFX4must return an error if the new password is found in the N last passwords used
6XXPmust accept the new password if different from the N last passwords used
[ACCO] account /change-password [APWD] When password rules are enabled Age rules:
J4O6must return an error if the current password’s age is below the set minimum
RGGNmust accept the new password if the current one’s age is greater than the set minimum
[ACCO] account /request-password-reset and /reset-password
G1VN“request” must trigger an email with a reset token, store that token, then “reset” must reset the password to the given value
HV0Vmust not trigger a reset email if mailing is deactivated
VZ1Wmust not trigger a reset email if reset mail is deactivated
3P2Nmust not be possible to use a reset token to illegally change password of another user
J6GB“request” must return an error if the requesting app is not trusted
5K14“request” must return an error if sent data is badly formatted
PKBP“reset” must return an error if the reset token is invalid/expired
ON9V“reset” must return an error if the requesting app is not trusted
T5L9“reset” must return an error if sent data is badly formatted
VGRT“reset” must return an error if the reset token was already used
[ACCO] account /request-password-reset and /reset-password [RPWD] When password rules are enabled
HZCUmust fail if the new password does not comply (smoke test; see “/change-password” tests)
[PGTD] DELETE /users/:username [USAD] depending on "user-account:delete" config parameter
8UT7Should accept when “personalToken” is active and a valid personal token is provided
IJ5FShould reject when “personalToken” is active and an invalid token is provided
NZ6GShould reject when only “personalToken” is active and a valid admin token is provided
UK8HShould accept when “personalToken” and “adminToken” are active and a valid admin token is provided
[PGTD] DELETE /users/:username [DOA0] dnsLess:isActive = true, openSource:isActive = false when given invalid authorization key
JNVSshould respond with 404
[PGTD] DELETE /users/:username [DOA0] dnsLess:isActive = true, openSource:isActive = false when given not existing username
C58Ushould respond with 404
[PGTD] DELETE /users/:username [DOA1] dnsLess:isActive = false, openSource:isActive = false [D7H1] when given existing username
T21Zshould respond with 200
K4J1should delete user entries from impacted collections
TIKTshould delete user event files
7WMGshould delete HF data
UWYYshould delete user audit events
U004should delete user from the cache
WMMVshould not delete entries of other users
9ZTMshould not delete other user event files
N8TRshould delete on register
[PGTD] DELETE /users/:username [DOA1] dnsLess:isActive = false, openSource:isActive = false when given invalid authorization key
T3UKshould respond with 404
[PGTD] DELETE /users/:username [DOA1] dnsLess:isActive = false, openSource:isActive = false when given not existing username
O73Jshould respond with 404
[PGTD] DELETE /users/:username [DOA2] dnsLess:isActive = true, openSource:isActive = true [D7H2] when given existing username
TPP2should respond with 200
581Zshould delete user entries from impacted collections
Z2FHshould delete user event files
YD0Bshould delete HF data
L2Q1should delete user audit events
CQ50should delete user from the cache
4IH8should not delete entries of other users
33T6should not delete other user event files
7D0Jshould delete on register
[PGTD] DELETE /users/:username [DOA2] dnsLess:isActive = true, openSource:isActive = true when given invalid authorization key
SQ8Pshould respond with 404
[PGTD] DELETE /users/:username [DOA2] dnsLess:isActive = true, openSource:isActive = true when given not existing username
1F2Yshould respond with 404
[PGTD] DELETE /users/:username User - Create - Delete - Create - Login
JBZMshould be able to recreate this user, and login
Events.streamIds events GET /events
WJ0Smust return streamIds & streamId containing the first one (if many)
Events.streamIds events GET /events/:id
IJQZmust return streamIds & streamId containing the first one (if many)
Events.streamIds events POST /events
X4PXmust forbid to provide both streamId and streamIds
Events.streamIds events POST /events when using "streamId"
1YUVmust return streamIds & streamId
Events.streamIds events POST /events when using "streamIds"
VXMGmust return streamIds & streamId containing the first one
2QZFmust clean duplicate streamIds
NY0Emust forbid providing an unknown streamId
6Z2Dmust forbid creating an event in multiple streams, if a contribute permission is missing on at least one stream
Events.streamIds events PUT /events/:id
BBBXmust return streamIds & streamId containing the first one (if many)
42KZmust allow modification, if you have a contribute permission on at least 1 streamId
Q5P7must forbid to provide both streamId and streamIds
Events.streamIds events PUT /events/:id when modifying streamIds
TQHGmust forbid providing an unknown streamId
6Q8Bmust allow streamId addition, if you have a contribute permission for it
MFF7must forbid streamId addition, if you don’t have a contribute permission for it
83N6must allow streamId deletion, if you have a contribute permission for it
JLS5must forbid streamId deletion, if you have read but no contribute permission for it
Events.streamIds events POST /event/start
FOM3must return a 410 (Gone)
Events.streamIds events POST /event/stop
BR33must return a 410 (Gone)
Events.streamIds events DELETE /events/:id
BPL0must return streamIds & streamId containing the first one (if many)
T5ZYmust allow trashing, if you have a contribute permission on at least 1 streamId
2G32must allow deletion, if you have a contribute permission on at least 1 streamId
6W5Ymust forbid trashing, if you don’t have a contribute permission on at least 1 streamId
Events.streamIds events GET /events/:id/:fileId -- attachments
JNS8should retrieve the attachment with the app token
6YFZshould retrieve the attachment with the app token correct headers
NH1Oshould retrieve the attachment with the shared access readToken
9KAFshould retrieve the attachment with the shared access token
9MELshould retrieve the attachment with the shared access readToken
Events.streamIds streams POST /streams
EGW2must forbid setting the “singleActivity” field
Events.streamIds streams PUT /streams/:id
EY79must forbid setting the “singleActivity” field
Events.streamIds streams DELETE /streams When the stream's event is part of at least another stream outside of its descendants when mergeEventsWithParent=false
TWDGmust not delete events, but remove the deleted streamId from their streamIds
Events.streamIds streams DELETE /streams When the event is part of the stream and its children when mergeEventsWithParent=false
6SBUmust delete the events
Events.streamIds streams DELETE /streams When the event is part of the stream and its children when mergeEventsWithParent=true
2FRRmust not delete events, but remove all streamIds and add its parentId
[EGSQ] events.get streams query Internal query helpers when transforming streams parameters
D2B5must convert strings array to expanded array inside [{any: []}]
JZWEmust convert single string “B” to [{any: [“B”]}]
8VV4must convert streams query with only “any” property to expanded streams query inside array [{any: []}])
HFT2must convert streams query property “all” to "and: [{any…}, {any…}]) with each containing expanded streamIds
PLMOmust convert streams query property “all” to "and: [{any…}]) with each containing expanded streamIds
JYURmust convert streams query property “all” and “not” to "and: [{any…}] not:) with each containing expanded streamIds
2W2Kmust accept two streams queries expanding them
2EF9must convert streams query {any: [“*”]} to [{any: [all accessible streams]}]
TUZTmust convert streams query {any: [*], not: [“A”]} to [{any: [all accessible streams], [expanded “A”]}]
NHGFnot accept any: "" query mixed with “all” query. like: {any: [], all: [“D”], not: [“A”]}
U0FAnot accept any: “*”, “B” mix. like: {any: ["*2, “D”], not: [“A”]}
N3Q6must convert {any: “*”, not: [“A”]} to [{any: [all accessible streams], not: [expanded “A”]}]
[EGSQ] events.get streams query Internal query helpers when transforming streams parameters with multiple stores
U6GSgroup query streamIds per store
I7GFshould throw an error if two different store are mixed in a query item
ZUTRshould expand queries from differnt store
[EGSQ] events.get streams query Internal query helpers exception and errors
IOLAmust throw on malformed expressions
[EGSQ] events.get streams query Internal query helpers toMongoQuery()
KKIHmust convert to MongoDB including expansion
4QMRmust convert to MongoDB including with “ALL”
NG7Fmust convert to MongoDB including expansion with “NOT”
HC6Xmust convert to MongoDB including expansion with “ALL” and “NOT”
0RNWmust handle array of queries
[EGSQ] events.get streams query GET /events with streams queries
NKH8must accept a simple string
BW6Zmust accept array of strings
HFA2must accept * (star) with a not without including items in trashed streams
MMB0must accept * (star) with !B && !E without including items in trashed streams
VUERmust return events in A && E
CBP2must return events in A && !B
I19Hmust return events in A && !D
55HBmust return events in A && NOT-EQUAL D
O4DJmust return all events in B || (D && !E)
UJSBmust accept an object in a batch call (instead of a stringified one)
ENFEmust accept a stringified object in a batch call
[EGSQ] events.get streams query GET /events with streams queries edge cases
X8B1must return an error on non-existing stream
WRVUmust return error when there is no “any”
30NVmust return error when provided a boolean instead of a string
YOJ9must return error when provided a null instead of a stream query
8NNPmust return an error when providing a non-stringified stream query
3X9Imust return an empty list when provided a trashed streamId
Events GET /
WC8Cmust return the last 20 non-trashed events (sorted descending) by default
U8U9must only return events for the given streams (incl. sub-streams) when set
S0M6must return an error if some of the given streams do not exist
R667must only return events with the given tag when set
KNJYmust only return events with any of the given tags when set
QR4Imust only return events of any of the given types when set
TWP8must (unofficially) support a wildcard for event types
4TWImust refuse unsupported event types
7MOUmust only return events in the given time period sorted ascending when set
W5ITmust take into account fromTime and toTime even if set to 0
Y6SYmust take into account modifiedSince even if set to 0
QNDPmust properly exclude period events completed before the given period
5UFWmust return ongoing events started before the given time period
S9J4must only return events in the given paging range when set
915Emust return only trashed events when requested
6H0Zmust return all events (trashed or not) when requested
JZYFmust return only events modified since the given time when requested
C3HUmust return an error if withDeletions is given as parameter
B766must include event deletions (since that time) when requested
V72Amust only return running period event(s) when requested
68ILmust return an error if no access token is provided
Events GET //
F29Mmust return the attached file with the correct headers
PP6Gmust return readToken in attachments
NL65must accept a secure read token in the query string instead of the `“Authorization” header
ZDY4must accept special chars in Content-Disposition header
TN27must allow a filename path suffix after the file id
LOUBmust allow any filename (including special characters)
9NJ0must refuse an invalid file read token
9HNMmust refuse auth via the regular “auth” query string parameter
MMCZmust return a proper error if trying to get an unknown attachment
Events POST /
1GR6must create an event with the sent data, returning it
QSBVmust set the event’s time to “now” if missing
6BVWmust accept explicit null for optional fields
D2THmust refuse events with no stream id
WN86must return a correct error if an event with the same id already exists
94PWmust not allow reuse of deleted ids (unlike streams)
DRFAmust only allow ids that are formatted like cuids
O7Y2must reject tags that are too long
2885must fix the tags to an empty array if not set
UL6Ymust not stop the running period event if the stream allows overlapping
FZ4Tmust validate the event’s content if its type is known
EL88must not fail when validating the content if passing a string instead of an object
JUM6must return an error if the sent data is badly formatted
5NELmust return an error if the associated stream is unknown
3S2Tmust allow the event’s period overlapping existing periods when the stream allows it
Q0L6must return an error if the assigned stream is trashed
WUSCmust not fail (500) when sending an array instead of an object
Z87Wmust not accept an empty streamIds array
Events POST / (multipart content)
4CUVmust create a new event with the uploaded files
HROImust properly handle part names containing special chars (e.g. “.”, “$”)
0QGVmust return an error if the non-file content part is not JSON
R8ERmust return an error if there is more than one non-file content part
Events POST / (multipart content)
ZI01must add the uploaded files to the event as attachments
EUZMmust add the uploaded files to the event without replacing existing attachments
Events GET /
8GSSallows access at level=read
IBO4denies access without authorization
Events PUT /
4QRUmust modify the event with the sent data
6B05must add/update/remove the specified client data fields without touching the others
FM3Gmust accept explicit null for optional fields
BS75must validate the event’s content if its type is known
FU83must return an error if the event does not exist
W2QLmust return an error if the sent data is badly formatted
01B2must return an error if the associated stream is unknown
CUM3must reject tags that are too long
Events PUT / forbidden updates of protected fields
MPUAmust prevent updating attachments
L15Umust prevent update of protected fields and throw a forbidden error in strict mode
6NZ7must prevent update of protected fields and log a warning in non-strict mode
Events PUT HF/non-HF events
Z7R1a normal event should not be updated to an hf-event
Z7R2An hf-event should not be updated to a normal event
Events DELETE //
RW8Mmust delete the attachment (reference in event + file)
ZLZNmust return an error if not existing
Events DELETE /
AT5Ymust flag the event as trashed
73CDmust delete the event when already trashed including all its attachments
Followed slices GET /
TNKSmust return all followed slices (ordered by user name, then access token)
U9M4must be forbidden to non-personal accesses
Followed slices POST /
HVYAmust create a new followed slice with the sent data, returning it
BULLmust return a correct error if the sent data is badly formatted
GPZKmust return a correct error if the same followed slice (url and token) already exists
RYNBmust return a correct error if a followed slice with the same name already exists
Followed slices PUT /
LM08must modify the followed slice with the sent data
QFGHmust return a correct error if the followed slice does not exist
RUQEmust return a correct error if the sent data is badly formatted
T256must return a correct error if a followed slice with the same name already exists
Followed slices DELETE /
U7LYmust delete the followed slice
UATVmust return a correct error if the followed slice does not exist
Methods/helpers/commonFunctions.js: catchForbiddenUpdate(schema) with streams schema
DMGVmust throw a forbidden error if “ignoreProtectedFieldUpdates” is null
Z51Kmust throw a forbidden error if “ignoreProtectedFieldUpdates” is false
EUKLmust not throw any error if “ignoreProtectedFieldUpdates” is true but print a warn log
Methods/helpers/commonFunctions.js: catchForbiddenUpdate(schema) with events schema
0RQMmust throw a forbidden error if “ignoreProtectedFieldUpdates” is null
6TK9must throw a forbidden error if “ignoreProtectedFieldUpdates” is false
IJ4Mmust not throw any error if “ignoreProtectedFieldUpdates” is true but print a warn log
Methods/helpers/commonFunctions.js: catchForbiddenUpdate(schema) with accesses schema
GP6Cmust throw a forbidden error if “ignoreProtectedFieldUpdates” is null
MUC0must throw a forbidden error if “ignoreProtectedFieldUpdates” is false
QGDAmust not throw any error if “ignoreProtectedFieldUpdates” is true but print a warn log
Auth /login
2CV5must authenticate the given credentials, open a session and return the access token
68SHmust return expired
5UMPmust reuse the current session if already open
509Amust accept “wildcarded” app ids and origins
ADL4must accept “no origin” (i.e. not a CORS request) if authorized
A7JLmust also accept “referer” in place of “origin” (e.g. some browsers do not provide “origin”)
IKNMmust also accept “referer” in place of “origin” (e.g. some browsers do not provide “origin”)
1TI6must not be case-sensitive for the username
L7JQmust return a correct error when the local credentials are missing or invalid
4AQRmust return a correct error if the app id is missing or untrusted
NDB0must return a correct error if the origin is missing or does not match the app id
FMJHmust support concurrent login request, saving only the last token that is written in the storage
9WHPmust not leak _private object from Result
Auth /login when we log into a temporary log file
C03Jmust replace the password in the logs by (hidden) when an error occurs
G0YTmust not mention the password in the logs when none is provided
Auth /login [WPRA] When password rules are enabled
675Vmust succeed if the password is not yet expired, returning planned expiration time and possible change time
D3EVmust return an error if the password has expired, indicating the date it did so
Auth /logout
6W5Mmust terminate the access session and fail to logout a second time (session already expired)
E2MD(or any request) must alternatively accept the access token in the query string
Auth SSO support
TIDWGET /who-am-i must return a 410 as it has been removed
Mailing helper methods
HGVDshould throw an error if mailing method is invalid
OKQ2should throw an error if mailing method is missing
Mailing helper methods using Mandrill validating request body
GU60should not be empty
8JJUshould contain a valid auth key
G906should contain a valid recipient
KBE0should contain a valid substitution of variables
2ABYshould contain valid tags
Mailing helper methods using Microservice validating request body
LHCBshould not be empty
9UEUshould contain a valid auth key
1Y6Kshould contain a valid recipient
UT8Mshould contain a valid substitution of variables
ArraySerializationStream testing around the array size limit
U21Zmust return a valid array when receiving limit-3 items
MKNLmust return a valid array when receiving limit-2 items
MUPFmust return a valid array when receiving limit-1 items
CM4Qmust return a valid array when receiving limit+0 items
F8S9must return a valid array when receiving limit+1 items
6T4Vmust return a valid array when receiving limit+2 items
QBOSmust return a valid array when receiving limit+3 items
ArraySerializationStream testing with small number of items
69F6must return a valid array when receiving 0 item(s)
BJRTmust return a valid array when receiving 1 item(s)
YJI0must return a valid array when receiving 2 item(s)
EKQQmust return a valid array when receiving 3 item(s)
DrainStream
AFWRmust be fed objects and return them in the callback
23UQmust return an error when the provided limit is exceeded
Permissions create-only level Permissions - create-only level Accesses GET / when using an access with a "create-only" permissions
HOTOshould return an empty list
Permissions create-only level Permissions - create-only level Accesses POST / when using an access with a "create-only" permission
X4Z1a masterToken should allow to create an access with a “create-only” permissions
ATCOan appToken with managed rights should allow to create an access with a “create-only” permissions
ATCYan appToken with managed rights should allow to create an access with a “create-only” permissions and selfRevoke forbidden
ATCRan appToken with read rights should be forbidden to create an access with a “create-only” permissions
ATCCan appToken with contribute rights should be allowed to create an access with a “create-only” permissions
FEGIa createOnlyToken should forbid to create an access with a “read” level permission permission
SL4Pshould forbid to create an access with a “contribute” level permission
ZX1Mshould forbid to create an access with a “manage” level permission
Permissions create-only level Permissions - create-only level Accesses PUT /
1WXJshould forbid updating accesses
Permissions create-only level Permissions - create-only level Accesses DELETE /
G6IPshould forbid deleting accesses
Permissions create-only level Events GET /
CKF3should return an error list when fetching explicitly “create-only” streams
V4KJshould not return events when fetching “create-only” streams that are children of “read” streams
SYRWshould not return events when fetching “create-only” streams that are children of “contribute” streams
Permissions create-only level Events GET /:id
N61Ishould forbid fetching an event when using a “create-only” permission
Permissions create-only level Events POST /
0G8Ishould forbid creating events for out of scope streams
F406should allow creating events for “create-only” streams
Permissions create-only level Events PUT /
V0UOshould forbid updating events for “create-only” streams
Permissions create-only level Events DELETE /
5OUTshould forbid deleting events for “create-only” streams
Permissions create-only level Events attachments GET /events/{id}/{fileId}[/{fileName}]
VTU4should be forbidden
Permissions create-only level Events attachments POST /events/{id}
8J8Oshould be forbidden
Permissions create-only level Events attachments DELETE /events/{id}/{fileId}
GY6Mshould be forbidden
Permissions create-only level Streams GET /
J12Fshould only return streams for which permissions are defined
Permissions create-only level Streams POST /
TFWFshould forbid creating child streams in “create-only” streams
Permissions create-only level Streams PUT /
PCO8should forbid updating “create-only” streams
Permissions create-only level Streams DELETE /
PCO9should forbid deleting “create-only” streams
Permissions create-only level Webhooks CREATE /
3AE9should allow creating webhooks
Permissions forcedStreams GET /events with forcedStreams
SO2Emust not see events on “B” when querying *
ELFFmust refuse querying C
Permissions none GET /events with none permissions
VVOAmust not see event in “none” level stream
Permissions selfRevoke POST /accesses
JYL5must list accesses with forbidden selfRevoke by GET /accesses
JYU5must forbid creating accesses with selfRevoke different than forbidden
Permissions selfRevoke [DACC] DELETE /accesses
AHS6must allow app accesses to self revoke by default
H6DUmust forbid app accesses to self revoke when set
3DR7must allow shared accesses to self revoke by default
F62Dmust forbid shared accesses to self revoke when set
Access permissions - Tags
F93Xmust return a 400 error when attempting to create an access with tag-based permissions
[ACCP] Access permissions Events
1AK1get must only return events in accessible streams
NKI5get must return all events when permissions are defined for “all streams” (*)
5360get (or any request) must alternatively accept the access token in the query string
KTM1must forbid getting an attached file if permissions are insufficient
2773must forbid creating events for ‘read-only’ streams
ZKZZmust forbid updating events for ‘read-only’ streams
4H62must forbid deleting events for ‘read-only’ streams
Y38Tmust allow creating events for ‘contribute’ streams
[ACCP] Access permissions Streams
BSFPget must only return streams for which permissions are defined
R4IAmust forbid creating child streams in ‘read-only’ streams
KHI7must forbid creating child streams in ‘contribute’ streams
MCDPmust forbid deleting child streams in ‘contribute’ streams
7B6Pmust forbid updating ‘contribute’ streams
RG5Rmust forbid deleting ‘contribute’ streams
21AZmust not allow creating child streams in trashed ‘managed’ streams
O1AZmust allow creating child streams in ‘managed’ streams
5QPUmust forbid moving streams into non-‘managed’ parent streams
KP1Qmust allow deleting child streams in ‘managed’ streams
HHSSmust recursively apply permissions to the streams’ child streams
NJ1Amust allow access to all streams when no specific stream permissions are defined
[ACCP] Access permissions Auth and change tracking
YE49must handle optional caller id in auth (in addition to token)
[ACCP] Access permissions Auth and change tracking custom auth step (e.g. to validate/parse caller id)
IA9Kmust be supported and deny access when failing
H58Rmust allow access when successful
H58Zmust allow access whith “callerid” headers
ISE4must fail properly (i.e. not granting access) when the custom function crashes
P4OMmust validate the custom function at startup time
Profile (app) GET /public
FWG1must return publicly shared key-value profile info
Profile (app) GET /app
13DLmust return key-value settings for the current app
J37Umust refuse requests with a shared access token
GYBNmust refuse requests with a personal access token
Profile (app) PUT /app
1QFBmust add/update/remove the specified keys without touching the others
0H9Amust refuse requests with a shared access token
JC5Fmust refuse requests with a personal access token
Profile (personal) GET
J61R/public must return publicly shared key-value profile info
HIMS/private must return private key-value profile info
36B1must return an appropriate error for other paths
FUJA“private” must be forbidden to non-personal accesses
Profile (personal) PUT
M28R/public must add/update/remove the specified keys without touching the others
WU9C/private must add/update/remove the specified keys without touching the others
2AS6must create the profile if not existing
Q99Emust return an appropriate error for other paths
T565must be forbidden to non-personal accesses
[REGC] registration: cluster POST /users (create user) [WAUW] when a user with the same username (not email) already exists in core but not in register
QV8Zshould respond with status 201
TCOMshould respond with the username and apiEndpoint
7QB6should send the right data to register
A2EMshould replace first user events in the storage
[REGC] registration: cluster POST /users (create user) when a user with the same username/email already exists in core but not in register
GRAWshould respond with status 201
AY44should respond with the username and apiEndpoint (TODO)
ZHYXshould send the right data to register
[REGC] registration: cluster POST /users (create user) when the username exists in register
NUC9should respond with status 409
X1IAshould respond with the correct error
JJJYshould send the right data to register
[REGC] registration: cluster POST /users (create user) when the email exists in register
SJXNshould respond with status 409
U0ZNshould respond with the correct error
2UNKshould send the right data to register
[REGC] registration: cluster POST /users (create user) when the user and email exist in register
LUC6should respond with status 409
XIN8should respond with the correct error
OIRYshould send the right data to register
[REGC] registration: cluster POST /users (create user) when there is a simultaneous registration
I0HGshould respond with status 409
QFVZshould respond with the correct error
MMG9should send the right data to register
[REGC] registration: cluster POST /users (create user) when invitationTokens are undefined and a random string is provided as "invitationToken"
CMOVshould respond with status 201
F0MOshould send the right data to register
[REGC] registration: cluster POST /users (create user) when invitationTokens are undefined and "invitationToken" is missing
LOIBshould respond with status 201
5O4Qshould send the right data to register
[REGC] registration: cluster POST /users (create user) when invitationTokens are defined when a valid one is provided
Z2ZYshould respond with status 201
DIFSshould send the right data to register
1BF3should find password in password history
[REGC] registration: cluster POST /users (create user) when invitationTokens are defined when an invalid one is provided
4GONshould respond with status 400
ZBYWshould send the right data to register
[REGC] registration: cluster POST /users (create user) when invitationTokens are set to [] (forbidden creation) when any string is provided
CX9Nshould respond with status 400
IH6Kshould send the right data to register
[REGC] registration: cluster POST /users (create user) when custom account streams validation exists when email is set as required and it is not set in the request
UMWBshould respond with status 400
8RDAshould respond with the correct error
[REGC] registration: cluster POST /users (create user) when custom account streams validation exists when field does not match custom validation settings
8W22should respond with status 400
GBKDshould respond with the correct error
[REGC] registration: cluster POST /users (create user) [RCPW] When password rules are enabled
0OBLmust fail if the new password does not comply (smoke test; see “/change-password” in account tests)
5BQLmust succeed if the new password complies (smoke test; see “/change-password” in account tests)
[BMM2] registration: DNS-less POST /users when given valid input
KB3Tshould respond with status 201
VDA8should respond with a username and apiEndpoint in the request body
LPLPValid access token exists in the response
M5XBshould store all the fields
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid username parameter that is too short
3Q1Hshould respond with status 400
M6CDshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid username parameter that is too long
WG46should respond with status 400
MST7should respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid username parameter that has invalid characters
TL2Wshould respond with status 400
TSC6should respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid username parameter that has an invalid type
XTD0should respond with status 400
EIKEshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid username parameter that is null
JQ7Vshould respond with status 400
G81Nshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid password parameter that is too short
FSE9should respond with status 400
OYZMshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid password parameter that is too long
KJGFshould respond with status 400
LQWXshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid password parameter that has an invalid type
SBCXshould respond with status 400
XFG4should respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid password parameter that is null
T56Vshould respond with status 400
MP5Fshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid email parameter that is too long
S8U8should respond with status 400
1JN8should respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid email parameter that has an invalid type
GV6Ishould respond with status 400
6OX5should respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid email parameter that is null
6SIDshould respond with status 400
PJY5should respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid appId parameter that is too short
5P2Eshould respond with status 400
I9QEshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid appId parameter that is too long
AQFLshould respond with status 400
HI9Vshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid appId parameter that has an invalid type
4XCVshould respond with status 400
8G9Vshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid appId parameter that is null
K4LEshould respond with status 400
NZ4Jshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid invitationToken parameter that has an invalid type
CYW6should respond with status 400
79A5should respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid invitationToken parameter that is null
UEKCshould respond with status 400
FJ51should respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid referer parameter that is too long
5BNJshould respond with status 400
V51Eshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid referer parameter that has an invalid type
J1DWshould respond with status 400
AFUHshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid language parameter that is too short
UPWYshould respond with status 400
QYT8should respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid language parameter that is too long
GDMWshould respond with status 400
LP4Sshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid language parameter that has an invalid type
R1LTshould respond with status 400
E95Ashould respond with the correct error message
[BMM2] registration: DNS-less POST /users Schema validation when given an invalid language parameter that is null
RHT6should respond with status 400
0QGWshould respond with the correct error message
[BMM2] registration: DNS-less POST /users Property values uniqueness username property
LZ1Kshould respond with status 409
M2HDshould respond with the correct error message
[BMM2] registration: DNS-less POST /users When providing an indexed value that is neither a number nor a string by providing an object
S6PSmust return an error
[BMM2] registration: DNS-less GET /reg/:username/check
7T9Lwhen checking a valid available username, it should respond with status 200 and {reserved:false}
153Qwhen checking a valid taken username, it should respond with status 409 and the correct error
H09Hwhen checking a too short username, it should respond with status 400 and the correct error
VFE1when checking a too long username, it should respond with status 400 and the correct error
FDTCwhen checking a username with invalid characters, it should respond with status 400 and the correct error
Events streaming with 2000 entries
SE1KStreams events
XZGBStreams deleted in sent as chunked
Result concatStream
36RQmust concatenate multiple streams in a single Array
Result toObject()
NKHFmust return the result’s content when not storing streams
MHASmust return the result content when storing streams
6P4Zmust return an error object when attempting to serialize streams containing an amountof objects exceeding the limit
TTELmust return an error when storing piped streams
H2GCmust return an error when the core pipeline crashes because of size
[ROOT] root GET /
UA7Bshould return basic server meta information as JSON when requested
TO50should return basic server meta information as text otherwise
TS3Dshould return an error if trying to access an unknown user account
[ROOT] root All requests:
TJHOshould return correct common HTTP headers + meta data in response body
OQ3Gshould return meta data in response body for errors as well
P06Yshould properly translate the Host header’s username (i.e. subdomain)
R3H5should translate the username in subdomain also when it only contains numbers
5IQKshould support POSTing “urlencoded” content with _json and _auth fields
2YEIshould support POSTing “urlencoded” content with _json, _method (PUT) and _auth fields
VJTPshould support POSTing “urlencoded” content with _json, _method (DELETE) and _auth fields
6D5Oshould properly handle JSON errors when POSTing “urlencoded” content with _json field
J2WPtrackingFunctions should update the access’s “last used” time and internal request counters
[ROOT] root OPTIONS /
PDMAshould return OK
[ROOT] root GET /access-info
0MI8must return current access information
[ROOT] root Accept Basic Auth request
0MI9must accept the https://token@user.domain/ AUTH schema
0MI0must accept the https://token:anystring@user.domain/ AUTH schema
3W3Ymust accept the https://token:@user.domain/ AUTH schema
M54Umust return a 401 error when basic auth is missing using https://@user.domain/
TPH4must return a 403 error when using https://:token@user.domain/
[ROOT] root POST / (i.e. batch call)
2IV3must be able to create streams with non-star permissions access
ORT3must execute the given method calls and return the results
TVPImust execute the method calls containing events.get and return the results
U4RBshould not add a null meta field in the response
WGVYmust return an error if the sent data is badly formatted
TV17streamed results such as stream.delete should be serialiazed
Service GET /service/info
FR4Kmust return all service info
Service-reporting POST report on service-reporting (started)
G1UGmust start and successfully send a report when service-reporting is listening
Socket.IO
25M0must dynamically create a namespace for the user
9ZH8must send correct CORS headers
VGKXmust connect with twice user name in the path (DnsLess)
VGKHmust connect to a user with a dash in the username
OSOTmust refuse connection if no valid access token is provided
Socket.IO calling API methods
FI6Fmust properly route method call messages for events and return the results, including meta
O3SWmust properly route method call messages for streams and return the results
TO6Zmust accept streamQuery as Javascript Object
NGUZmust not crash when callers omit the callback
ACA3must fail if the called target does not exist
L8WJmust fail if the called method does not exist
SNCWmust return API errors properly, including meta
744Zmust notify other sockets for the same user about events changes
GJLTmust notify other sockets for the same user (only) about streams changes
JC99must notify on each change
Socket.IO when using an access with a "create-only" permission
K2OOmust allow a connection
Socket.IO when spawning 2 api-server processes, A and B
JJRAchanges made in A notify clients of B
[STRE] streams GET /
TG78must return non-trashed streams (as a tree) by default
DPWGmust return all streams (trashed or not) when requested
RDD5must include stream deletions (since the given time) when requested
T8AMmust include stream deletions even when the given time is 0
1M8Amust not keep stream deletions past a certain time (cannot test because cannot force-run Mongo’s TTL cleanup task)
W9VCmust return a correct 401 error if no access token is provided
UVWKmust return child streams when providing a parent stream id
AJZLmust return a correct error if the parent stream is unknown
G5F2must return a correct error if the stream is unknown
[STRE] streams POST /
ENVVmust create a new “root” stream with the sent data, returning it
A2HPmust return a correct error if the sent data is badly formatted
GGS3must return a correct error if a stream with the same id already exists
UHKImust allow reuse of deleted ids
8WGGmust accept explicit null for optional fields
NR4Dmust fail if a sibling stream with the same name already exists
JINCmust return a correct error if the sent data is not valid JSON
CHDMmust create a new child stream (with predefined id) when providing a parent stream id
88VQmust return an error if the new stream’s parentId is the empty string
84RKmust slugify the new stream’s predefined id
2B3Hmust return a correct error if the parent stream is unknown
8JB5must return a correct error if the given predefined stream’s id is “null”
6TPQmust return a correct error if the given predefined stream’s id is “*”
Z3RCmust accept streamId “size”
[STRE] streams PUT /
SO48must modify the stream with the sent data
5KNJmust accept explicit null for optional fields
0ANVmust add/update/remove the specified client data fields without touching the others
PL2Gmust return a correct error if the stream does not exist
JWT4must return a correct error if the sent data is badly formatted
344Imust fail if a sibling stream with the same name already exists
JT6Gmust modify the stream with the sent data event if name and parentId sent are the same
PT1Emust move the stream under the given parent when specified
HJBHmust return a correct error if the new parent stream is unknown
29S6must return an error if the “parentId” is the same as the “id”
[STRE] streams PUT / forbidden updates of protected fields
PN1Hmust fail and throw a forbidden error in strict mode
A3WCmust succeed by ignoring protected fields and log a warning in non-strict mode
[STRE] streams [STRD] DELETE /
205Amust flag the specified stream as trashed
TEFFmust delete the stream when already trashed with its descendants if there are no linked events
LVTRmust return a correct error if there are linked events and the related parameter is missing
RKEUmust reject the deletion of a root stream with mergeEventsWithParent=true
26V0must reassign the linked events to the deleted stream’s parent when specified
KLD8must delete the linked events when mergeEventsWithParent is false
1U1Mmust return a correct error if the item is unknown
[SYRO] system route
JT1Ashould parse correctly usernames starting with “system”
CHEKSystem check Platform integrity
[SYRO] system route DELETE /mfa
1V4Dshould return 204
3HE9should delete the user’s “mfa” profile property
I2PUshould not delete anything else in the profile
[SYER] system (ex-register) POST /create-user (DEPRECATED)
0G7Cmust not send a welcome email if mailing is deactivated
TWBFmust not send a welcome email if welcome mail is deactivated
[SYER] system (ex-register) POST /create-user (DEPRECATED) when email sending really works
FUTRmust create a new user with the sent data, sending a welcome email
[SYER] system (ex-register) POST /create-user (DEPRECATED) when it just replies OK
9K71must run the process but not save anything for test username “recla”
ZG1Lmust support the old “/register” path for backwards-compatibility
VGF5must return a correct 400 error if the sent data is badly formatted
ABI5must return a correct 400 error if the language property is above 5 characters
OVI4must return a correct 400 error if the language property is the empty string
RD10must return a correct 400 error if a user with the same user name already exists
NPJEmust return a correct 400 error if a user with the same email address already exists
Y5JBmust return a correct 404 error when authentication is invalid
GF3Lmust return a correct error if the content type is wrong
[SYER] system (ex-register) POST /create-user (DEPRECATED) when we log into a temporary log file
Y69Bmust replace the passwordHash in the logs by (hidden) when the authentication is invalid
MEJ9must replace the passwordHash in the logs by (hidden) when the payload is invalid (here parameters)
CO6Hmust not mention the passwordHash in the logs when none is provided
[SYER] system (ex-register) GET /user-info/{username}
9C1AtrackingFunctions must return user information (including time of last account use)
FNJ5must return a correct 404 error when authentication is invalid
[SSDC] SystemStreams config when valid custom systemStreams are provided
GB8Gmust set default values and other fields
KMT3must prefix default streams with the Pryv prefix
PVDCmust prefix custom streams with the customer prefix
[SSDC] SystemStreams config When retro-compatibility is activated and a streamId unicity conflict exists between a custom system streamId and a default one
3Z9Nmust throw a config error
[SSDC] SystemStreams config When custom system streams contain duplicate streamIds
CHEFmust throw a config error
[SSDC] SystemStreams config When providing a custom system stream that is unique but not indexed
42A1must throw a config error
[SSDC] SystemStreams config When providing a custom system stream that has an invalid type
LU0Amust throw a config error
[SSDC] SystemStreams config When providing an "other" custom stream that is unique
GZEKmust throw a config error
[SSDC] SystemStreams config When providing an "other" custom stream that is indexed
2IBLmust throw a config error
[SSDC] SystemStreams config When providing an "other" custom stream that is non editable
655Xmust throw a config error
[SSDC] SystemStreams config When providing an "other" custom stream that is required at registration
OJJ0must throw a config error
Config: serviceInfo when dnsLess is disabled when "serviceInfoUrl" points to a file
D2P7should load serviceInfo
Uploads middleware hasFileUpload
GY5Hshould parse file uploads
Notifications #serverReady
B76Gnotifies internal listeners
SRAUnotifies axon listeners
Notifications #accountChanged
P6ZDnotifies internal listeners
Q96Snotifies axon listeners
Notifications #accessesChanged
P5CGnotifies internal listeners
VSN6notifies axon listeners
Notifications #followedSlicesChanged
VU4Anotifies internal listeners
UD2Bnotifies axon listeners
Notifications #streamsChanged
LDUQnotifies internal listeners
BUR1notifies axon listeners
Notifications #eventsChanged
N8RInotifies internal listeners
TRMWnotifies axon listeners
Service Register Errors
LPD4Should remove not matching params from duplicate Error
Authentication hasProperties
IKAIreturns true if all properties exist
K2PZreturns false if not all properties exist
U2NAreturns false if null is given
WJ7Jreturns false if a string is given
TryCoerceStringValues
DTZ1should behave as documented in the method
X26Sdoesn’t create keys in object
4MHHshould convert to array
X8PYnumber conversion works
Versioning Events
RWIAmust not return history when calling events.get
Versioning Events deletionMode
FLLWmust delete the event’s history when deleting it with deletionMode=keep-nothing
6W0Bmust minimize the event’s history when deleting it with deletionMode=keep-authors
1DBCmust not modify the event’s history when deleting it with deletionMode=keep-everything
Versioning Events events.getOne
YRI7must not return an event’s history when calling getOne with includeHistory flag off
KPQZmust return an event’s history when calling getOne with includeHistory flag on
Versioning Events forceKeepHistory is OFF
PKA9must not generate history when updating an event
Versioning Events forceKeepHistory is ON
0P6Smust generate history when updating an event
NZQBmust generate history when trashing an event
Versioning Streams
H1PKmust generate events’ history when their stream is deleted with mergeEventsWithParents=true since their streamId is modified
95TJmust delete the events’ history when their stream is deleted with mergeEventsWithParents=false and deletionMode=‘keep-nothing’
4U91must keep the events’ minimal history when their stream is deleted with mergeEventsWithParents=false and deletionMode=‘keep-authors’
D4CYmust not delete the events’ history when their stream is deleted with mergeEventsWithParents=false and deletionMode=‘keep-everything’
Versioning Users
4ETLmust allow reusing unique values after they are in history
Webhooks GET / when using an app token
R5KDshould return a status 200 with a webhooks object which is an array
67CXshould fetch all webhooks reachable by an app token
WSJGshould not fetch any Webhook outside its scope
Webhooks GET / when using a personal token
6MNCshould return a status 200 with a webhooks object which is an array
4YFQshould fetch all webhooks for the user
Webhooks GET / when using a shared token
RIZVshould return a status 200 with a webhooks object which is an array
Webhooks GET /:webhookId when using an app token when fetching an existing webhook inside its scope
XMB7should return a status 200 with a webhook object
Webhooks GET /:webhookId when using an app token when fetching an existing webhook outside of its scope
BDC2should return a status 403 with a forbidden error
Webhooks GET /:webhookId when using an app token when fetching an unexistant webhook
O6MMshould return a status 404 with a unknown resource error
Webhooks GET /:webhookId when using a personal token
D8YQshould return a status 200 with a webhook object
Webhooks GET /:webhookId when using a shared token
604Hshould return a status 200 with a webhook object
Webhooks POST / when using an app token when providing a valid webhook
Z1XDshould return a status 201 with the created webhook
XKLUshould save it to the storage
Webhooks POST / when using an app token when providing an existing url
60OQshould return a status 409 with a collision error error
Webhooks POST / when using an app token when providing invalid parameters when url is not a string
3VIUshould return a status 400 with a invalid parameters error
Webhooks POST / when using a shared token when providing a valid webhook
YTLWshould return a status 201 with the created webhook
UC6Jshould save it to the storage
Webhooks POST / when using a personal token when providing a valid webhook
3AZOshould return a status 403 with a forbidden error
Webhooks PUT /:webhookId when using an app token when updating an existing webhook when changing a valid parameter
C9FUshould return a status 200 with the updated webhook
JSOHshould apply the changes to the storage
Webhooks PUT /:webhookId when using an app token when updating an existing webhook when changing a readonly parameter
PW4Ishould return a status 403 with an invalid parameter error
Webhooks PUT /:webhookId when using an app token when updating a webhook outside its scope
8T2Gshould return a status 403 with a forbidden error
Webhooks PUT /:webhookId when using an app token when updating an unexistant webhook
AR5Rshould return a status 404 with an unknown resource error
Webhooks PUT /:webhookId when using a personal token when providing valid parameters
LCKNshould return a status 200 with the updated webhook
Webhooks PUT /:webhookId when using a shared token when providing valid parameters
TMIZshould return a status 200 with the updated webhook
Webhooks DELETE /:webhookId when using an app token when deleting an existing webhook
A0CGshould return a status 200 with the webhook deletion
KA98should delete it in the storage
Webhooks DELETE /:webhookId when using an app token when deleting an unexistant webhook
ZPRTshould return a status 404 with an unknown resource error
Webhooks DELETE /:webhookId when using an app token when deleting an already deleted webhook
5UX7should return a status 404 with an unknown resource error
Webhooks DELETE /:webhookId when using an app token when deleting a webhook outside of its scope
7O0Fshould return a status 403 with a forbidden error
Webhooks DELETE /:webhookId when using a personal token when deleting an existing webhook
P6X4should return a status 200 with the webhook deletion
Webhooks DELETE /:webhookId when using a shared token when deleting an existing webhook
OZZBshould return a status 200 with the webhook deletion
Webhooks POST /:webhookId/test when using an app token when the webhook exists when the URL is valid
ZM2Bshould return a status 200 with a webhook object
Q7KLshould send a POST request to the URL
Webhooks POST /:webhookId/test when using an app token when the webhook exists when the URL is invalid
KLROshould return a status 400 with an error object
Webhooks POST /:webhookId/test when using an app token when the webhook does not exist
KXA8should return a status 404 with a unknown resource error
Webhooks POST /:webhookId/test when using an app token when the webhook is outside of its scope
KZJDshould return a status 403 with a forbidden error
Webhooks POST /:webhookId/test when using a personal token when the webhook exists
HYZZshould return a status 200 with a webhook object
SBI7should send a POST request to the URL
Webhooks POST /:webhookId/test when using a shared token when the webhook exists
O8PBshould return a status 200 with a webhook object
C62Ishould send a POST request to the URL

business component

Summary

81tests total
81✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
Manage InfluxDB data (business.series.*)
8GFHshould allow writing to a series
Webhook send() when sending to an existing endpoint when the endpoint answers ASAP
Q7B2should send it
FICWshould add a log to runs
2VRKshould add the correct status to the last run
AOCPshould add the correct timestamp to the last run
2M6Fshould increment runCount
S1CYshould not increment failCount
22X1should send the meta
Webhook send() when sending to an existing endpoint when the endpoint answers with a long delay
SRDLshould send the second message after the first
Webhook send() when sending to an unexistant endpoint
6UJHshould add a log to runs
VKUAshould add the no status to the last run
40UZshould add the correct timestamp to the last run
UE17should increment runCount
UJ2Yshould increment failCount
V5NHshould increment currentRetries
Webhook send() when scheduling for a retry when the notifications service is down
E5VQshould save the run
XP7Gshould increment currentRetries
9AL1should schedule for a retry
OHLYshould send scheduled messages after an interval
1VITshould reset error tracking properties
Webhook send() when throttling frequent calls
73TGshould only send the message once
WPMHshould accumulate messages
YLWKshould schedule for a retry after minInterval
OZGPshould send scheduled messages after an interval
86OPshould remove the timeout afterwards
Webhook send() when the webhook becomes inactive after failures
768Lshould run 5 times
PX10should update the state to inactive
BLNPshould update the stored version
ODNMshould not run anymore
Webhook send() when the runs array gets shifted
FYORshould rotate the runs
MethodContext #parseAuth
ZRW8should parse token out
AUIYshould also parse the callerId when available
MethodContext #retrieveAccessFromId
OJW2checks expiry of the access
BatchRequest .parse
QJ6Lshould parse the happy case
VV2Oaccepts an empty batch
0NWOthrows if format is missing or wrong
881Ythrows if another type is passed in
2PZ0throws if envelope doesn’t have a data attribute
BatchRequestElement .parse(obj)
AGQKshould parse a good looking object
LWMEfails if input is not an Object
BU7Qfails if eventId is missing or the wrong type
DataMatrix .parse(obj)
576Jshould accept the happy path
IQTErefuses if not an object
WQGBrefuses if format is not flatJSON
34RSrefuses if fields are not strings
M5BIrefuses if points is not an array
V0SHrefuses if field names are not correct
SBU1refuses if data cannot be coerced
DataMatrix #eachRow
QUQ3should iterate over all matrix rows
DataMatrix #transform
L03Rshould call fn for each cell
7BRVshould store the return value in the matrix
DataMatrix #minmax()
QGY6returns the minimum and maximum deltaTime used
ROK8throws an error if the matrix is empty
79DAthrows an error if the deltaTime is missing
Business.series.Row toStruct
NJ4Gshould return a js object for the row
Business.series.Repository with stubbed out connection
0UEAshould produce series objects for events
Business.types.TypeRepository type list update
WMDWshould work (must be called manually)
6VL6should fail gracefully
Business.types.TypeRepository basic types like mass/kg
EEWVshould be known
J0CJshould return a type instance allowing conversion
8WI1should throw when conversion fails
WKCSshould coerce to number during validation
Business.types.TypeRepository boolean type boolean/bool
E2Y1should be known
8FHUshould return a type instance allowing conversion
8U3Ushould coerce to boolean during validation
Business.types.TypeRepository complex types like position/wgs84
05LAshould be known
0QZ3should return a complex type instance
Business.types.TypeRepository complex types on several levels like message/facebook
D0GTshould return the correct value type for all fields
3BC9should return the correct value type for optional fields
IVPFshould resolve nested fields
5PMMdoes NOT handle requiredFields fully yet: only surface requirements are returned
Business.types.TypeRepository placeholder types like picture/attached
78HIshould be known
85BQshould return a type instance allowing conversion
Business.types.TypeRepository series types like series:mass/kg
SQNQshould be known
IR3Bshould inform about fields correctly
Business.types.TypeRepository validate()
VK9Jshould accept an array as a known type’s event content
Business.types.TypeValidator
AE3Qshould be produced via a type repository
JT1Fshould validate simple types
QIVHshould validate complex types
Users repository createUser()
7C22must throw an item already exists error when username field is not unique
6CFEmust throw an item already exists error when email field is not unique

cache component

Summary

10tests total
10✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
Cache
FELTSecond get stream must be faster that first one
XDP6Cache should reset permissions on stream structure change when moving a stream in and out
Synchro
LHGVShould register listener on userId when using setStreams
RYQDShould register listener on userId when using setAccessLogic.
R7I6Should unset access Logic on unset Message
8M1BRegistered listener should be removed on clearEvent
KF7ERegistered listener should be removed on unsetUser
OKHQListeners should not receive “internal” messages
Y5GAListeners should receive “nats” messages UNSET_USER_DATA
Y5GUListeners should receive “nats” messages UNSET_USER

hfs-server component

Summary

60tests total
60✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
Storing BATCH data in a HF series Use Case: Store data in InfluxDB, Verification on either half
Q2ISshould store data correctly
Storing BATCH data in a HF series POST /:user_name/series/batch
A3BQshould return core-metadata in every call
QHM5should fail without ‘Authorization’ header
Storing BATCH data in a HF series POST /:user_name/series/batch when the token has no permissions on the event
R57Lfails
Storing BATCH data in a HF series POST /:user_name/series/batch when the token has a "create-only" permission
ATAHshould work
Storing BATCH data in a HF series POST /:user_name/series/batch when using a metadata updater stub
OO01should schedule a metadata update on every store
Querying data from a HF series
Q1X1should should accept a query with authentication token header
Q1X2should accept a query with authentication token in url parameter
Q1X3must accept basic auth schema
RAIJshould return core-metadata in every call
XAI2should accept a query when the authorized permission is on the event’s 2nd streamId
I2ZHshould refuse a query for an unknown user
EYCAshould refuse a query missing the authorization token
OINYshould refuse a query containing an unauthorized token
Q991should return an unknown resource error when querying data for an nonexistent event id
QMC7should refuse a query containing parameters with the wrong format
HGVVshould refuse a query when toTime is before fromTime
XI4Mshould refuse a query with a “create-only” token
[SDHF] Storing data in a HF series Use Case: Store data in InfluxDB, Verification on either half
ZUBIshould convert timestamp to deltaTime
GZIZshould store data correctly
KC15should return data once stored
YALYshould accept a request when the authorized permission is on the event’s 2nd streamId
[SDHF] Storing data in a HF series UPDATE and DELETE on handling event affect the serie
UD1Cmoving event in time does empty the cache
UD2Ctrashed event cannot be written to
ZTG6deleted events deletes series
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series bypassing authentication with auth success
N3PMstores data into InfluxDB
TL0Dshould return core-metadata in every call
RESCshould reject non-JSON bodies
KT1Rresponds with headers that allow CORS on OPTIONS
H1CGresponds with headers that allow CORS on POST
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series bypassing authentication with auth success when request is malformed
96HCshould be rejected (format is not flatJSON)
38W3should be rejected (matrix is not square - not enough fields)
GJL5should be rejected (no negative deltaTime)
GJL4should be rejected (value types are not all valid)
JJROshould be rejected (missing deltaTime column)
LKFGshould be rejected (missing value column for a simple input)
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series bypassing authentication with auth success when using a metadata updater stub
GU3Lshould schedule a metadata update on every store
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series bypassing authentication with auth failure
NLAWrefuses invalid/unauthorized accesses
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series storing data in different formats
Y3BLstores data of any basic type
3WGHstores data of complex types
1NDBdoesn’t accept data in non-series format
YMHKstores strings
ZL7Cstores floats
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series complex types such as ratio/generic
DTZ2refuses to store when deltaTime is present twice (ambiguous!)
UU4Rrefuses to store when other fields are present twice (ambiguous!)
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series complex types such as ratio/generic null fields
7UZTaccept null fields
7UTTdo not accept null for required fields
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series complex types such as ratio/generic when not all required fields are given
FNDTrefuses to store when not all required fields are given
H525returns error id “invalid-request-structure”
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series complex types such as ratio/generic when field names don't match the type
AJMSrefuses to store when field names don’t match the type
7CR7returns the error message with the id “invalid-request-structure”
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series complex types such as position/wgs84
UDHOallows storing any number of optional fields, on each request
JDTHrefuses unknown fields
[SDHF] Storing data in a HF series POST /events/EVENT_ID/series using a "create-only" permissions
YCGZshould work
Metadata Loader
U6F2should allow write access to series
Metadata Cache
O8AEreturns loaded metadata for N minutes
Server
O84Ican be constructed
Server .start
1VELstarts a http server on configured port
Controller storeSeriesData
3BYCshould reject queries if the authorization header is missing
U0WBshould reject queries if the eventId is missing

mall component

Summary

22tests total
22✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
Per-store key-value DB
2Z7LMust set and get key-value data
[MSTE] Stores Streams & Events Streams GET
1Q12Must retrieve dummy streams when querying parentId
UVQ2Must retrieve “yo” streams and “:dummy:” when requesting “*”
XC20master token must retrieve “yo” streams and all stores when requesting “*”
XC21personal token must retrive :dummy: stream structure
XC22app token must retrive :dummy: stream structure
XC23master token must retrive :dummy: stream structure
3ZTMRoot streams must have null parentIds “*”
[MSTE] Stores Streams & Events Streams CREATE
2Q12Create a stream under dummy
2Q13Should fail creating outside of store
2Q14Should fail creating outside of store 2
[MSTE] Stores Streams & Events Streams UPDATE
3Q12Create a stream under dummy
3Q13Should fail moving a stream outside of store
[MSTE] Stores Streams & Events Events GET
XD21personal token must retrive :dummy: events
XD22master token must retrive :dummy: events
XD23app token must retrive :dummy: events
[MSTE] Stores Streams & Events Events CREATE
YD21create event on :dummy:
YD22create with a given id on :dummy:
YD23should fail on mismatching stream and id in store
YD24should fail on mismatching stream in store and id
[MSTE] Stores Streams & Events Events UPDATE
ZD21update event :dummy:dummyevent0
ZD22should fail moving an event to another store

messages component

Summary

7tests total
7✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
NatsPublisher
S386should construct
I21Mdelivers messages to “USERNAME”
NatsSubscriber
DMMPshould construct
NatsSubscriber when subscribed to "foobar" subscribe("USERNAME")
4MAIaccepts messages from USERNAME.sok1 and dispatches them to sinks
47BPignores messages from other users
NatsSubscriber when subscribed to "foobar" unsubscribe()
L49Eshould unsubscribe from NATS
Pubsub removers
LVNKremover works

metadata component

Summary

21tests total
21✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
Metadata Updater
POMCallows scheduling an update
Metadata Updater/Controller #runEach(ms)
9TJ0starts a timer and runs #act every n ms
Metadata Updater/Controller #flushOp(update)
2W9Cconstructs an Flush operation for the update and returns it
Metadata Updater/Controller #act
CIPHpulls elapsed updates and flushes them to MongoDB
ErrorLogger
9UORforwards calls
5AVEcatches and logs all exceptions, rethrowing afterwards
9J9Ualso works for async methods, waiting for the eventual result
Flush event with no existing metadata
D5N1writes event metadata to disk
Flush event with existing metadata
5QO0doesn’t modify duration
Z70Fleaves base data intact
UD1Bupdate event duration if over current Duration
PendingUpdatesMap #merge and #get
RE2Dstores updates
JJ2Ymerges updates with preexisting updates via #merge
PendingUpdatesMap #elapsed
O55Wreturns all updates that should be flushed
HWPPuses #flushAt to determine deadlines
PendingUpdate #merge
412Vconstructively merges two updates
HS79fails when key is not equal
PendingUpdate #flushAt()
79JJreturns cooldown when deadline is far away
OQLPreturns deadline when deadline is < cooldown
Heap #pop
CW89pops an item
S15Jreturns null if the heap is empty

middleware component

Summary

8tests total
8✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
LoadAccess middleware when an access is actually loaded in request context
OD3Dshould add the access id as Pryv-access-id header if token is valid
UDW7should still set the Pryv-access-id header in case of error (e.g. expired token)
LoadAccess middleware when the access can not be loaded (e.g. invalid token)
9E2Dshould not set the Pryv-access-id header
APIVersion#version when a ".api-version" file exists in the project and is !== that 1.2.3
5ICPreads .api-version and returns that constant
APIVersion#version when a ".api-version" file exists in the project and is 1.2.3
HV40should return git tag version
SubdomainToPath middleware using a minimal application
V0R9should not transform illegal usernames
Q5A5should transform username into a path segment
IDDEshould accept dashes

platform component

Summary

0tests total
0✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest

previews-server component

Summary

16tests total
16✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
Event previews GET //preview
NRT9must return JPEG previews for “picture/attached” events and cache the result
FEWUmust accept “.jpg” extension in the path (backwards-compatibility)
PBC1must adjust the desired size to the bigger standard size (if exists)
415Lmust limit the desired size to the biggest standard size if too big
CWTQmust serve the cached file if available
2MMEmust regenerate the cached file if obsolete
7Y91must respond with “no content” if the event type is not supported
61N8must return a proper error if the event does not exist
VIJOmust forbid requests missing an access token
FAK4must forbid requests with unauthorized accesses
QUM3must return a proper error if event data is corrupted (no attachment object)
DQF6must return a proper error if event data is corrupted (no attached file)
GSDFmust work with animated GIFs too
Event previews POST /clean-up-cache
FUYEmust clean up cached previews not accessed for one week by default
G5JRmust ignore files with no readable extended attribute
(index) OPTIONS /
E5MWshould return OK

storage component

Summary

31tests total
31✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
Migration - 1.7.x
V8JRmust handle data migration from 1.6.21 to 1.7.1
Migration - 1.7.5
MA7Jmust handle data migration from 1.7.1 to 1.7.5
Migration - 1.8.0
WBIKmust handle userIndex/events migration from 1.7.5 to 1.8.0
PH6Cmust handle userIndex/repository migration from 1.7.5 to 1.8.0
URHSmust handle platfrom migration from 1.7.5 to 1.8.0
Migration - 1.9.0
XAABCheck integrity of database
Migrations - new install
OVYLmust set the initial version to the package file version and not perform other migrations
Database #close()
BYRGcloses the database connection
Database Mongo duplicate errors
9UBAmust detect mongo duplicate errors with isDuplicateError
W1FOmust augment mongo duplicate errors with duplicate check utilities
D0ENmust fail if mongo duplicate error message changed
[UAST] Users Account Storage addPasswordHash()
B2I7must throw an error if two passwords are added with the same time
[UAST] Users Account Storage getCurrentPasswordTime()
85PWmust return the time of the current password
V54Smust throw an error if there is no password for the user id
[UAST] Users Account Storage passwordExistsInHistory()
1OQPmust return true when looking for existing passwords
DO33must return false when looking for a non-existing password
FEYPmust return false when looking for an existing password that is beyond the given range
[UCSQ] userSQLite Storage concurent Writes
69AHshould retry when SQLITE_BUSY
9H7Pshould fail when max retries is reached when SQLITE_BUSY
[USQL] userSQLite toSqliteQuery()
YS6Ymust convert to SQLite including expansion
R8I5must convert to SQLite including with “ALL”
SGO5must convert to SQLite streams query property “all” to "and: [{any…}, {any…}]) with each containing expanded streamIds
RPGXmust convert to SQLite streams query property “all” to "and: [{any…}, {any…}]) with each containing expanded streamIds
EWLKmust convert to SQLite streams query property “all” to "and: [{any…}, {any…}]) with each containing expanded streamIds
1FYYmust convert to SQLite including expansion with “NOT”
4QSGmust convert to SQLite including expansion with “AND” and “NOT”
3TTKmust convert to SQLite including expansion with “ALL” and “NOT”
1ZJUmust handle array of queries
SQLite user-centric storage migration
MFFRa single Migrate v0 to v1
RXVFcheck userDir and perform migration when needed

tprpc component

Summary

3tests total
3✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
Base API
GZFKmaking a call
V7MJfailing a call (server-side)
Type Compilation
0YBRcompiles a .proto 3 syntax file into a set of flow-type interfaces

utils component

Summary

10tests total
10✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
Tree utils buildTree()
32CBmust build a correct tree for a given consistent array
VVVSmust throw an error if objects do not contain the necessary properties
CEUFmust throw an error if the object in argument is not an array
Tree utils flattenTree()
11JJmust build a correct array for a given tree
OVJMmust throw an error if the object in argument is not an array
Tree utils findInTree()
S1N0must return the first item matching the given iterator function
SI6Lmust return null if no item matches the given iterator function
Tree utils filterTree()
YIE6must return only items matching the given iterator function
Tree utils collect()
AU44must return an array with values matching the iterator function for each item in the tree
Tree utils expandIds()
PFJPmust return an array with the ids passed in argument plus those of all their descendants

webhooks component

Summary

8tests total
8✅ passing
0❓ pending
0❌ failing

Tests

IdStatusTest
Webhooks when loading Webhooks on startup when booting the webhooks application
YD6Nshould send a boot message to all active webhooks
UM4Tshould send nothing to inactive webhooks
Webhooks when loading Webhooks on startup when creating an event in a Webhook scope when the notifications server is running
3TMHshould send API call to the notifications server
7N4Lshould update the Webhook’s data to the storage
Webhooks [BBB] when creating a Webhook through api-server when the notifications server is running returning 400
EXQDshould register a new webhook in the service through NATS
8Q4Eshould deactivate after failures
PY61should be run again when updating its state
Webhooks when there are running webhooks when deleting a webhook through API server
904Dshould deactivate the current running webhook through NATS