Skip to content

Commit 2a51e4f

Browse files
test(kernel): align dispatch tests with ref policy
1 parent 0ce2345 commit 2a51e4f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/plugin-dispatch.test.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const URL_EXAMPLE = "https://worker.example";
99
const WORKFLOW_ID = "action.yml";
1010
const DEVELOPMENT_REF = "development";
1111
const DIST_DEVELOPMENT_REF = "dist/development";
12-
const DIST_DEVELOP_REF = "dist/develop";
1312
const MANIFEST_FIXTURE = {
1413
name: "plugin",
1514
short_name: "ubiquity-os-marketplace/daemon-spec-rewriter@development",
@@ -148,7 +147,7 @@ Deno.test("resolvePluginDispatchTarget: uses dist/development when artifact mani
148147
assertEquals(reposGetCalls, 0);
149148
});
150149

151-
Deno.test("resolvePluginDispatchTarget: supports develop/development artifact compatibility aliases", async () => {
150+
Deno.test("resolvePluginDispatchTarget: does not alias development to develop", async () => {
152151
const refsTried: string[] = [];
153152
let reposGetCalls = 0;
154153
const context = {
@@ -157,7 +156,7 @@ Deno.test("resolvePluginDispatchTarget: supports develop/development artifact co
157156
repos: {
158157
getContent: async ({ ref }: { ref?: string }) => {
159158
refsTried.push(String(ref));
160-
if (ref === DIST_DEVELOP_REF) {
159+
if (ref === DEVELOPMENT_REF) {
161160
return {
162161
data: {
163162
content: btoa(JSON.stringify(MANIFEST_FIXTURE)),
@@ -191,8 +190,8 @@ Deno.test("resolvePluginDispatchTarget: supports develop/development artifact co
191190
const plugin: GithubPlugin = { owner: "octo", repo: "demo", workflowId: WORKFLOW_ID, ref: DEVELOPMENT_REF };
192191
const target = await resolvePluginDispatchTarget({ context, plugin });
193192

194-
assertEquals(target, { kind: "workflow", owner: "octo", repository: "demo", workflowId: WORKFLOW_ID, ref: DIST_DEVELOP_REF });
195-
assertEquals(refsTried, [DIST_DEVELOPMENT_REF, DIST_DEVELOP_REF]);
193+
assertEquals(target, { kind: "workflow", owner: "octo", repository: "demo", workflowId: WORKFLOW_ID, ref: DEVELOPMENT_REF });
194+
assertEquals(refsTried, [DIST_DEVELOPMENT_REF, DEVELOPMENT_REF]);
196195
assertEquals(reposGetCalls, 0);
197196
});
198197

@@ -240,6 +239,6 @@ Deno.test("resolvePluginDispatchTarget: falls back to source branch when artifac
240239
const target = await resolvePluginDispatchTarget({ context, plugin });
241240

242241
assertEquals(target, { kind: "workflow", owner: "octo", repository: "demo", workflowId: WORKFLOW_ID, ref: DEVELOPMENT_REF });
243-
assertEquals(refsTried, [DIST_DEVELOPMENT_REF, DIST_DEVELOP_REF, DEVELOPMENT_REF]);
242+
assertEquals(refsTried, [DIST_DEVELOPMENT_REF, DEVELOPMENT_REF]);
244243
assertEquals(reposGetCalls, 0);
245244
});

0 commit comments

Comments
 (0)