Skip to content

Commit 74c375d

Browse files
committed
test(site/e2e): catch missing agent defaults in fillResource
1 parent 1f7c63c commit 74c375d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

site/e2e/helpers.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ const createTemplateVersionTar = async (
469469
} as App;
470470
});
471471
}
472-
return {
472+
const agentResource = {
473473
apps: [],
474474
architecture: "amd64",
475475
connectionTimeoutSeconds: 300,
@@ -490,6 +490,16 @@ const createTemplateVersionTar = async (
490490
token: randomUUID(),
491491
...agent,
492492
} as Agent;
493+
494+
try {
495+
Agent.encode(agentResource);
496+
} catch (e) {
497+
throw new Error(
498+
"agentResource encode failed, missing defaults? " + e,
499+
);
500+
}
501+
502+
return agentResource;
493503
},
494504
);
495505
}

0 commit comments

Comments
 (0)