test(daytona): retire duplicate pack span execution (#16099)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip authored and GitHub committed 2026-10-14 23:45:50 -05:00
1 parent aa6910939b
commit 3b6d1452f2
1 file changed
+1 -36
@@ -5148,6 +5148,7 @@ describe("daytona native file-sync hooks", () => {
const pack = spans.find((span) => span.name === "pack");
expect(pack).toBeDefined();
expect(pack!.ended).toBe(true);
expect(pack!.attributes["paperclip.sandbox.startup.provider"]).toBe("daytona");
expect(typeof pack!.attributes["paperclip.sandbox.startup.pack.wall_ms"]).toBe("number");
const transfer = spans.find((span) => span.name === "transfer");
@@ -5241,42 +5242,6 @@ describe("daytona native file-sync hooks", () => {
}
});
it("records a pack span for a traced directory mapping", async () => {
const hostDir = await makeHostDir();
const sourceDir = path.join(hostDir, "assets");
await fs.mkdir(sourceDir, { recursive: true });
await fs.writeFile(path.join(sourceDir, "a.txt"), "alpha");
const sandbox = createMockSandbox();
mockGet.mockResolvedValue(sandbox);
const { tracer, spans } = createRecordingPluginTracer();
const restore = __setDaytonaPluginContextForTest({ tracer } as unknown as PluginContext);
try {
await plugin.definition.onEnvironmentSyncIn?.({
driverKey: "daytona",
companyId: "company-1",
environmentId: "env-1",
config: { timeoutMs: 300000, reuseLease: false },
lease: syncLease(),
operations: [
{
operationId: "sync-op-pack",
files: [
{ sourcePath: sourceDir, targetPath: `${REMOTE_DIR}/.paperclip-runtime/assets`, kind: "directory" },
],
},
],
});
} finally {
restore();
}
const pack = spans.find((span) => span.name === "pack");
expect(pack).toBeDefined();
expect(pack!.ended).toBe(true);
expect(pack!.attributes["paperclip.sandbox.startup.provider"]).toBe("daytona");
});
it("opens a postUploadCommand span for a post-upload command with a working directory", async () => {
const hostDir = await makeHostDir();
const source = path.join(hostDir, "config.txt");