@substrat-run/contract-tests 0.146.0 → 0.148.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bind-module.d.ts +4 -0
- package/dist/bind-module.d.ts.map +1 -1
- package/dist/capability-expiry-suite.d.ts.map +1 -1
- package/dist/capability-expiry-suite.js +6 -4
- package/dist/capability-expiry-suite.js.map +1 -1
- package/dist/counter-runner.d.ts +22 -0
- package/dist/counter-runner.d.ts.map +1 -0
- package/dist/counter-runner.js +96 -0
- package/dist/counter-runner.js.map +1 -0
- package/dist/derived-module.d.ts +4 -0
- package/dist/derived-module.d.ts.map +1 -1
- package/dist/entity-state-module.d.ts +8 -0
- package/dist/entity-state-module.d.ts.map +1 -1
- package/dist/entity-trash-module.d.ts +4 -0
- package/dist/entity-trash-module.d.ts.map +1 -1
- package/dist/erasure-module.d.ts +4 -0
- package/dist/erasure-module.d.ts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/job-run-suite.d.ts.map +1 -1
- package/dist/job-run-suite.js +4 -0
- package/dist/job-run-suite.js.map +1 -1
- package/dist/modules.d.ts +124 -0
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +4 -0
- package/dist/modules.js.map +1 -1
- package/dist/permission-suite.d.ts.map +1 -1
- package/dist/permission-suite.js +19 -0
- package/dist/permission-suite.js.map +1 -1
- package/dist/schedule-suite.d.ts.map +1 -1
- package/dist/schedule-suite.js +1 -0
- package/dist/schedule-suite.js.map +1 -1
- package/dist/scope-host-suite.d.ts.map +1 -1
- package/dist/scope-host-suite.js +223 -0
- package/dist/scope-host-suite.js.map +1 -1
- package/dist/scope-store-runner-suite.d.ts +46 -0
- package/dist/scope-store-runner-suite.d.ts.map +1 -0
- package/dist/scope-store-runner-suite.js +187 -0
- package/dist/scope-store-runner-suite.js.map +1 -0
- package/dist/scope-store-suite.d.ts +13 -0
- package/dist/scope-store-suite.d.ts.map +1 -0
- package/dist/scope-store-suite.js +557 -0
- package/dist/scope-store-suite.js.map +1 -0
- package/dist/sql-limits-suite.d.ts.map +1 -1
- package/dist/sql-limits-suite.js +50 -1
- package/dist/sql-limits-suite.js.map +1 -1
- package/dist/stamps-module.d.ts +4 -0
- package/dist/stamps-module.d.ts.map +1 -1
- package/dist/store-kind-release-suite.d.ts +12 -0
- package/dist/store-kind-release-suite.d.ts.map +1 -0
- package/dist/store-kind-release-suite.js +353 -0
- package/dist/store-kind-release-suite.js.map +1 -0
- package/dist/subject-erasure-suite.d.ts.map +1 -1
- package/dist/subject-erasure-suite.js +15 -0
- package/dist/subject-erasure-suite.js.map +1 -1
- package/dist/system-switch-suite.js +1 -1
- package/dist/system-switch-suite.js.map +1 -1
- package/dist/upload-link-module.d.ts +168 -0
- package/dist/upload-link-module.d.ts.map +1 -0
- package/dist/upload-link-module.js +95 -0
- package/dist/upload-link-module.js.map +1 -0
- package/dist/upload-link-suite.d.ts +3 -0
- package/dist/upload-link-suite.d.ts.map +1 -0
- package/dist/upload-link-suite.js +328 -0
- package/dist/upload-link-suite.js.map +1 -0
- package/dist/vertical-events-suite.d.ts +8 -0
- package/dist/vertical-events-suite.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type StoreRequest } from '@substrat-run/contracts';
|
|
2
|
+
import { type ScopeStoreRunner } from '@substrat-run/kernel';
|
|
3
|
+
/**
|
|
4
|
+
* What a kind hands the runner suite. The suite knows nothing about the kind beyond
|
|
5
|
+
* two calls of its own catalog.
|
|
6
|
+
*/
|
|
7
|
+
export interface ScopeStoreRunnerFixture {
|
|
8
|
+
/** A runner nobody has started. Called once per check. */
|
|
9
|
+
makeRunner(): ScopeStoreRunner | Promise<ScopeStoreRunner>;
|
|
10
|
+
/** A kind operation that changes the object. Each call must change what `read` answers. */
|
|
11
|
+
readonly write: StoreRequest;
|
|
12
|
+
/** A kind operation that reads the object back. Equal answers mean equal objects. */
|
|
13
|
+
readonly read: StoreRequest;
|
|
14
|
+
}
|
|
15
|
+
/** One check of the runner contract. It throws when the runner breaks it. */
|
|
16
|
+
export interface ScopeStoreRunnerCheck {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The runner contract (#2213, RFC §7) as a list of checks, so a broken runner can be
|
|
22
|
+
* shown to fail the one it breaks. {@link scopeStoreRunnerContractSuite} runs them all.
|
|
23
|
+
*
|
|
24
|
+
* Every call goes through the kernel's callers both hosts use (`callScopeStore`,
|
|
25
|
+
* `callReservedStoreOperation`), so an answer is held to the same envelope and result
|
|
26
|
+
* schema a host would hold it to.
|
|
27
|
+
*
|
|
28
|
+
* A restart is `stop()` then `start()` on the same runner instance: what a host does
|
|
29
|
+
* between a `close` and the next first store call. A kind's repositories must survive
|
|
30
|
+
* it. Blob cells in an export are not asserted (their spelling over JSON is not settled).
|
|
31
|
+
*/
|
|
32
|
+
export declare function scopeStoreRunnerChecks(fixture: ScopeStoreRunnerFixture): ScopeStoreRunnerCheck[];
|
|
33
|
+
/**
|
|
34
|
+
* The runner contract a scope-store kind's runner passes (#2213). A kind runs it in its
|
|
35
|
+
* own repository, against its own runner: the platform runs only the trivial kind.
|
|
36
|
+
*
|
|
37
|
+
* ```ts
|
|
38
|
+
* scopeStoreRunnerContractSuite('graph', {
|
|
39
|
+
* makeRunner: () => graphRunner({ dir }),
|
|
40
|
+
* write: { operation: 'apply', input: { … } },
|
|
41
|
+
* read: { operation: 'inspect' },
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function scopeStoreRunnerContractSuite(kind: string, fixture: ScopeStoreRunnerFixture): void;
|
|
46
|
+
//# sourceMappingURL=scope-store-runner-suite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-store-runner-suite.d.ts","sourceRoot":"","sources":["../src/scope-store-runner-suite.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACxG,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,0DAA0D;IAC1D,UAAU,IAAI,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC3D,2FAA2F;IAC3F,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;CAC7B;AAED,6EAA6E;AAC7E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACtB;AAUD;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,uBAAuB,GAAG,qBAAqB,EAAE,CAuJhG;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,IAAI,CAMlG"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { storeResponse } from '@substrat-run/contracts';
|
|
3
|
+
import { callReservedStoreOperation, callScopeStore, ulid, } from '@substrat-run/kernel';
|
|
4
|
+
/** An address no other check, and no earlier run, has used. */
|
|
5
|
+
function freshAddress() {
|
|
6
|
+
return { tenantId: ulid(), vertical: 'conformance', scopeId: ulid(), binding: 'STORE' };
|
|
7
|
+
}
|
|
8
|
+
/** An operation name no kind declares, and still a valid label. */
|
|
9
|
+
const UNKNOWN_OPERATION = 'conformance-unknown-operation';
|
|
10
|
+
/**
|
|
11
|
+
* The runner contract (#2213, RFC §7) as a list of checks, so a broken runner can be
|
|
12
|
+
* shown to fail the one it breaks. {@link scopeStoreRunnerContractSuite} runs them all.
|
|
13
|
+
*
|
|
14
|
+
* Every call goes through the kernel's callers both hosts use (`callScopeStore`,
|
|
15
|
+
* `callReservedStoreOperation`), so an answer is held to the same envelope and result
|
|
16
|
+
* schema a host would hold it to.
|
|
17
|
+
*
|
|
18
|
+
* A restart is `stop()` then `start()` on the same runner instance: what a host does
|
|
19
|
+
* between a `close` and the next first store call. A kind's repositories must survive
|
|
20
|
+
* it. Blob cells in an export are not asserted (their spelling over JSON is not settled).
|
|
21
|
+
*/
|
|
22
|
+
export function scopeStoreRunnerChecks(fixture) {
|
|
23
|
+
/** A started runner for one check, stopped after it whatever happens. */
|
|
24
|
+
const withRunner = async (body) => {
|
|
25
|
+
const runner = await fixture.makeRunner();
|
|
26
|
+
await runner.start();
|
|
27
|
+
try {
|
|
28
|
+
await body(runner);
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
31
|
+
await runner.stop();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const call = (runner, address, request) => callScopeStore((r) => runner.invoke(address, r), request.operation, request.input);
|
|
35
|
+
const read = (runner, address) => call(runner, address, fixture.read);
|
|
36
|
+
const write = (runner, address) => call(runner, address, fixture.write);
|
|
37
|
+
const reserved = (runner, address, operation, input) => callReservedStoreOperation((r) => runner.invoke(address, r), operation, input);
|
|
38
|
+
return [
|
|
39
|
+
{
|
|
40
|
+
name: 'a stop without a start resolves',
|
|
41
|
+
async run() {
|
|
42
|
+
const runner = await fixture.makeRunner();
|
|
43
|
+
await runner.stop();
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'a kind call answers the envelope, and an unknown operation answers its error',
|
|
48
|
+
async run() {
|
|
49
|
+
await withRunner(async (runner) => {
|
|
50
|
+
const address = freshAddress();
|
|
51
|
+
expect(storeResponse.safeParse(await runner.invoke(address, fixture.read)).success).toBe(true);
|
|
52
|
+
const unknown = storeResponse.parse(await runner.invoke(address, { operation: UNKNOWN_OPERATION }));
|
|
53
|
+
expect('error' in unknown).toBe(true);
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'a write is read back on its own address',
|
|
59
|
+
async run() {
|
|
60
|
+
await withRunner(async (runner) => {
|
|
61
|
+
const address = freshAddress();
|
|
62
|
+
const before = await read(runner, address);
|
|
63
|
+
await write(runner, address);
|
|
64
|
+
expect(await read(runner, address)).not.toEqual(before);
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'the object is keyed on the whole address: tenant, vertical, scope and binding',
|
|
70
|
+
async run() {
|
|
71
|
+
await withRunner(async (runner) => {
|
|
72
|
+
const address = freshAddress();
|
|
73
|
+
const empty = await read(runner, freshAddress());
|
|
74
|
+
await write(runner, address);
|
|
75
|
+
// Each neighbour differs from the written address in exactly one field.
|
|
76
|
+
const neighbours = [
|
|
77
|
+
{ ...address, tenantId: ulid() },
|
|
78
|
+
{ ...address, vertical: 'conformance-other' },
|
|
79
|
+
{ ...address, scopeId: ulid() },
|
|
80
|
+
{ ...address, binding: 'OTHER' },
|
|
81
|
+
];
|
|
82
|
+
for (const neighbour of neighbours) {
|
|
83
|
+
expect(await read(runner, neighbour), JSON.stringify(neighbour)).toEqual(empty);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'a stop and a start serve the same repositories',
|
|
90
|
+
async run() {
|
|
91
|
+
await withRunner(async (runner) => {
|
|
92
|
+
const address = freshAddress();
|
|
93
|
+
await write(runner, address);
|
|
94
|
+
const written = await read(runner, address);
|
|
95
|
+
await runner.stop();
|
|
96
|
+
await runner.start();
|
|
97
|
+
expect(await read(runner, address)).toEqual(written);
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'substrat.size answers { bytes }',
|
|
103
|
+
async run() {
|
|
104
|
+
await withRunner(async (runner) => {
|
|
105
|
+
const address = freshAddress();
|
|
106
|
+
await write(runner, address);
|
|
107
|
+
const { bytes } = await reserved(runner, address, 'substrat.size');
|
|
108
|
+
expect(Number.isInteger(bytes)).toBe(true);
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'substrat.export answers { tables } in the scope-dump table shape',
|
|
114
|
+
async run() {
|
|
115
|
+
await withRunner(async (runner) => {
|
|
116
|
+
const address = freshAddress();
|
|
117
|
+
await write(runner, address);
|
|
118
|
+
const { tables } = await reserved(runner, address, 'substrat.export');
|
|
119
|
+
expect(tables.length).toBeGreaterThan(0);
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: 'substrat.import replaces the whole object and answers the tables it wrote',
|
|
125
|
+
async run() {
|
|
126
|
+
await withRunner(async (runner) => {
|
|
127
|
+
const source = freshAddress();
|
|
128
|
+
const target = freshAddress();
|
|
129
|
+
await write(runner, source);
|
|
130
|
+
await write(runner, target);
|
|
131
|
+
await write(runner, target);
|
|
132
|
+
// The target holds more than the source, so a merge cannot pass for a replace.
|
|
133
|
+
expect(await read(runner, target)).not.toEqual(await read(runner, source));
|
|
134
|
+
const { tables } = await reserved(runner, source, 'substrat.export');
|
|
135
|
+
const imported = await reserved(runner, target, 'substrat.import', { tables });
|
|
136
|
+
expect(imported.tables).toBe(tables.length);
|
|
137
|
+
expect(await read(runner, target)).toEqual(await read(runner, source));
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'substrat.wipe answers {} and leaves an empty object, also where nothing was written',
|
|
143
|
+
async run() {
|
|
144
|
+
await withRunner(async (runner) => {
|
|
145
|
+
const address = freshAddress();
|
|
146
|
+
const empty = await read(runner, freshAddress());
|
|
147
|
+
await write(runner, address);
|
|
148
|
+
expect(await reserved(runner, address, 'substrat.wipe')).toEqual({});
|
|
149
|
+
expect(await read(runner, address)).toEqual(empty);
|
|
150
|
+
expect(await reserved(runner, freshAddress(), 'substrat.wipe')).toEqual({});
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'substrat.erase answers { erased }, and a repeat erases nothing more',
|
|
156
|
+
async run() {
|
|
157
|
+
await withRunner(async (runner) => {
|
|
158
|
+
const address = freshAddress();
|
|
159
|
+
const subjectId = ulid();
|
|
160
|
+
await write(runner, address);
|
|
161
|
+
await reserved(runner, address, 'substrat.erase', { subjectId });
|
|
162
|
+
expect(await reserved(runner, address, 'substrat.erase', { subjectId })).toEqual({ erased: 0 });
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
];
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* The runner contract a scope-store kind's runner passes (#2213). A kind runs it in its
|
|
170
|
+
* own repository, against its own runner: the platform runs only the trivial kind.
|
|
171
|
+
*
|
|
172
|
+
* ```ts
|
|
173
|
+
* scopeStoreRunnerContractSuite('graph', {
|
|
174
|
+
* makeRunner: () => graphRunner({ dir }),
|
|
175
|
+
* write: { operation: 'apply', input: { … } },
|
|
176
|
+
* read: { operation: 'inspect' },
|
|
177
|
+
* });
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
export function scopeStoreRunnerContractSuite(kind, fixture) {
|
|
181
|
+
describe(`scope-store runner (#2213): ${kind}`, () => {
|
|
182
|
+
for (const check of scopeStoreRunnerChecks(fixture)) {
|
|
183
|
+
it(check.name, () => check.run());
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=scope-store-runner-suite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-store-runner-suite.js","sourceRoot":"","sources":["../src/scope-store-runner-suite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MA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AAK,MAAM,KAAK,IAAI,sBAAsB,CAAC,OAAO,CAAC,EAAE,CAAC;YACpD,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;QACpC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ScopeStoreRunner } from '@substrat-run/kernel';
|
|
2
|
+
import type { ScopeHostFixture } from './scope-host-suite.js';
|
|
3
|
+
/**
|
|
4
|
+
* Scope stores on every adapter (#2213). The fixture is handed the runner, so
|
|
5
|
+
* both hosts answer the same counter. The reserved name is refused by the stub.
|
|
6
|
+
*/
|
|
7
|
+
export declare function scopeStoreContractSuite(adapterName: string, makeFixture: (scopeStores: {
|
|
8
|
+
runners: {
|
|
9
|
+
binding: string;
|
|
10
|
+
runner: ScopeStoreRunner;
|
|
11
|
+
}[];
|
|
12
|
+
}) => Promise<ScopeHostFixture>): void;
|
|
13
|
+
//# sourceMappingURL=scope-store-suite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-store-suite.d.ts","sourceRoot":"","sources":["../src/scope-store-suite.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,KAAK,gBAAgB,EAAwB,MAAM,sBAAsB,CAAC;AAGzG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAiD9D;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,CACX,WAAW,EAAE;IAAE,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,gBAAgB,CAAA;KAAE,EAAE,CAAA;CAAE,KACtE,OAAO,CAAC,gBAAgB,CAAC,GAC7B,IAAI,CA8jBN"}
|