the account every token this cloud issues names
the device this cloud's device token names
the token of the device FakeCloud.deviceId, as registering returns it
the account's generation, which each move of the root raises
how many notification sockets are open
the hash of the root index
answer the reads of the blob hash again
tell every open notification socket that device sent event
answer one request as the network and the account would, throwing a
TypeError where it failed at the transport
answer the next request with status and body, doing nothing; queued in order
the blob stored under hash, whether seeded or sent by a client
answer the next count session fetches with a 503, as a busy auth host does
Readonlyconnectthe notification socket, as a platform's connect
fail the next count requests at the transport before acting on them
answer every request that carries a session token issued so far with a 401
answer every request that carries the session token token with a 401, as once it expired
Readonlyfetchthe account's http, as a client's fetch
the item id's file named name in full, such as <id>.content, if it has one
the names of the item id's files, as its index lists them
forget every blob larger than bytes, so large uploads are not kept
the headers of every notification socket handshake, in order
close every open notification socket from the account's side, as it does every few minutes
whether every blob the account's indexes name is stored
every item the root index lists, in the order of their ids
act on the next count requests and then fail each at the transport, the answer lost
the item id's .metadata, if it has a readable one
the item id's .metadata to edit and put back, if it has a readable one
a new item id, minted in order, so a test makes the same ids each run
a new page id, minted in order
answer every read of the blob hash with a 503, as a server failing one file would
answer the next count requests other than a token's with a 401, as for an expired session
drop the item id's file name, as a half-written upload leaves it,
moving the generation, and give the hash of the item's new index
remove the item id from the root index, as a purge by another device does
every request the cloud was sent, in order, kept only with checks on
forget the requests sent and their counts
answer every session fetch with a 401, as for a device token that was revoked
items to add as another device would, written in one root write
answer the next count requests with a 503, doing nothing
answer the next count root reads with the root before the latest move
whether a root write that asks to tell other devices sends a sync event to every open socket (default: true)
fail every request and every socket at the transport, as with no network, or stop
make the next count root writes lose, as though another device wrote first
how many requests of each kind the cloud was sent
answer the next count blob reads with a 200 and only the first half of the blob
write the item id's file name as another device would, moving the
generation, and give the hash of the item's new index
an in-memory reMarkable account, answering at the testHosts
Give a client its
fetch, and itsconnectfor notifications, with the test hosts and a session from sessionToken. Withcheckson, the default, it logs every request and refuses what the account refuses: a token that proves nothing, a blob whose name, checksum or hash is wrong, a root write at another generation or naming a blob never sent. Off, as for a benchmark, it logs nothing and only refuses a root write at another generation.Seed it with
seeding, break it with the failure switches, and read back what a client left withitems,fileandisWhole. A switch that takes acountreplaces what is left of the last one, so0turns it off.Example