summaryrefslogtreecommitdiffstats
path: root/docs/resource.md
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-18 15:17:30 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-01-18 15:17:30 +0100
commitd8cd2d6585507a4e40881092a633ec1a80b14dd9 (patch)
treee710026c9191fe42643f7996a55b460e3ff39622 /docs/resource.md
parent0d55900241772fa5cc5028934358cbcb28702c46 (diff)
downloadsink-d8cd2d6585507a4e40881092a633ec1a80b14dd9.tar.gz
sink-d8cd2d6585507a4e40881092a633ec1a80b14dd9.zip
Draft of inspection API
Diffstat (limited to 'docs/resource.md')
-rw-r--r--docs/resource.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/resource.md b/docs/resource.md
index c8f58e9..0988535 100644
--- a/docs/resource.md
+++ b/docs/resource.md
@@ -141,3 +141,10 @@ The remoteid mapping has to be updated in two places:
141 141
142* New entities that are synchronized immediately get a localid assinged, that is then recorded together with the remoteid. This is required to be able to reference other entities directly in the command queue (i.e. for parent folders). 142* New entities that are synchronized immediately get a localid assinged, that is then recorded together with the remoteid. This is required to be able to reference other entities directly in the command queue (i.e. for parent folders).
143* Entities created by clients get a remoteid assigned during change replay, so the entity can be recognized during the next sync. 143* Entities created by clients get a remoteid assigned during change replay, so the entity can be recognized during the next sync.
144
145# Testing / Inspection
146Resources new to be tested, which often requires inspections into the current state of the resource. This is difficult in an asynchronous system where the whole backend logic is encapsulated in a separate process without running tests in a vastly different setup from how it will be run in production.
147
148To alleviate this inspection commands are introduced. Inspection commands are special commands that the resource processes just like all other commands, and that have the sole purpose of inspecting the current resource state. Because the command is processed with the same mechanism as other commands we can rely on ordering of commands in a way that a prior command is guaranteed to be executed once the inspection command is processed.
149
150A typical inspection command could i.e. verify that a file has been created in the expected path after a create command.