@norskvideo/ctl-test-harness 0.1.16 → 0.1.17
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/package.json +1 -1
- package/smoke.d.ts +12 -3
- package/smoke.js +3 -2
package/package.json
CHANGED
package/smoke.d.ts
CHANGED
|
@@ -34,7 +34,14 @@ export interface SmokeContext {
|
|
|
34
34
|
}): Promise<CliResult>;
|
|
35
35
|
fetchStudio(path: string): Promise<Response>;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
/** Set on any observation that holds with or without a source — a resilient
|
|
38
|
+
* switch that keeps a ladder fed from a slate, a control surface that is up
|
|
39
|
+
* regardless — so it runs the satisfied phase only. `components` is
|
|
40
|
+
* structural by nature and needs no flag. */
|
|
41
|
+
interface Structural {
|
|
42
|
+
structural?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export type SmokeObservation = Structural & ({
|
|
38
45
|
kind: "components";
|
|
39
46
|
ids: string[];
|
|
40
47
|
} | {
|
|
@@ -60,7 +67,7 @@ export type SmokeObservation = {
|
|
|
60
67
|
kind: "custom";
|
|
61
68
|
label: string;
|
|
62
69
|
satisfied: (ctx: SmokeContext) => Promise<boolean>;
|
|
63
|
-
};
|
|
70
|
+
});
|
|
64
71
|
export interface SmokeSpec {
|
|
65
72
|
product: {
|
|
66
73
|
/** Manifest name, e.g. "norsk-probe". The registration must report it. */
|
|
@@ -142,8 +149,10 @@ export interface SmokePorts extends BaseHarnessPorts {
|
|
|
142
149
|
export declare function smokePorts(slug: string, overrides?: Partial<SmokePorts>): SmokePorts;
|
|
143
150
|
export declare const defaultSmokeDeps: SmokeDeps;
|
|
144
151
|
/** Whether an observation depends on a source being pumped. Structural ones
|
|
145
|
-
*
|
|
152
|
+
* (`components`, or anything the spec marks `structural`) run the satisfied
|
|
153
|
+
* phase only. */
|
|
146
154
|
export declare function sourceDependent(o: SmokeObservation): boolean;
|
|
147
155
|
/** One sample of an observation — the predicate the three phases poll. */
|
|
148
156
|
export declare function observationSatisfied(o: SmokeObservation, ctx: SmokeContext, readers: SmokeReaders): Promise<boolean>;
|
|
149
157
|
export declare function runProductSmoke(slug: string, spec: SmokeSpec, deps?: SmokeDeps): Promise<void>;
|
|
158
|
+
export {};
|
package/smoke.js
CHANGED
|
@@ -100,9 +100,10 @@ function describeObservation(o) {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
/** Whether an observation depends on a source being pumped. Structural ones
|
|
103
|
-
*
|
|
103
|
+
* (`components`, or anything the spec marks `structural`) run the satisfied
|
|
104
|
+
* phase only. */
|
|
104
105
|
export function sourceDependent(o) {
|
|
105
|
-
return o.kind !== "components";
|
|
106
|
+
return o.kind !== "components" && o.structural !== true;
|
|
106
107
|
}
|
|
107
108
|
/** One sample of an observation — the predicate the three phases poll. */
|
|
108
109
|
export async function observationSatisfied(o, ctx, readers) {
|