Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions scripts/installed-meeting-integration.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,7 @@ export const installedMeetingIntegration = async ({
assert.equal(before.present, false)
assert.equal(before.involvement, false)
assert.deepEqual(before.audit, [])
const eventArgs = [
"meetings",
"update",
reference,
"--event-id",
String(target.eventId),
"--expected-event-id",
"none",
]
const eventArgs = ["meetings", "link", reference, "--event-id", String(target.eventId), "--expected-event-id", "none"]
assert.equal(json(...eventArgs).applied, false)
assert.equal(json(...eventArgs, "--yes", "--dry-run").applied, false)
assert.equal(native("audit", target).eventId, null)
Expand All @@ -161,7 +153,7 @@ export const installedMeetingIntegration = async ({
invoke(["--json", ...eventArgs, "--yes"], 3)
const unlinked = json(
"meetings",
"update",
"link",
reference,
"--event-id",
"none",
Expand Down
20 changes: 11 additions & 9 deletions scripts/installed-platform.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,13 @@ const original = "WEBVTT\n\n00:00.000 --> 00:01.000\nAlice Example: Original inv
writeFileSync(vtt, original)
json("meetings", "import", folder)
json("meetings", "import", folder)
const meetings = json("meetings", "list").items
const meetings = json("meetings", "list", "--backend", "archive").items
assert.equal(meetings.length, 1)
assert.equal(typeof meetings[0].id, "string")
const meetingId = String(meetings[0].id)
writeFileSync(vtt, original.replace("Original", "Corrected"))
json("meetings", "import", folder)
assert.equal(json("meetings", "show", meetingId).transcripts.length, 1)
assert.equal(json("meetings", "show", meetingId, "--backend", "archive").transcripts.length, 1)
assert.equal(json("meetings", "transcript", meetingId, "--history").items.length, 2)
assert.equal(json("search", "meetings", "Original").items.length, 0)
assert.equal(json("search", "meetings", "Corrected").items.length, 1)
Expand Down Expand Up @@ -402,7 +402,7 @@ assert.equal(importedReplay.created, false)
assert.equal(importedReplay.inserted_transcripts, 0)
assert.equal(importedReplay.replayed_transcripts, 1)
assert.equal(importedReplay.superseded_transcripts, 0)
assert.equal(json("meetings", "show", archivedMeetingId).transcripts.length, 1)
assert.equal(json("meetings", "show", archivedMeetingId, "--backend", "archive").transcripts.length, 1)
const manifestPath = join(archive, `.zoom-archive-${digest(uuid)}.json`)
const correctedArchive = original.replace("Original", "Revised archive")
writeFileSync(asset, correctedArchive)
Expand All @@ -416,11 +416,11 @@ assert.equal(correctedReceipt.inserted_transcripts, 1)
assert.equal(correctedReceipt.replayed_transcripts, 0)
assert.equal(correctedReceipt.superseded_transcripts, 1)
json("recordings", "archive", "import", archive)
assert.equal(json("meetings", "show", archivedMeetingId).transcripts.length, 1)
assert.equal(json("meetings", "show", archivedMeetingId, "--backend", "archive").transcripts.length, 1)
assert.equal(json("meetings", "transcript", archivedMeetingId, "--history").items.length, 2)
assert.equal(json("search", "meetings", "Original").items.length, 0)
assert.equal(json("search", "meetings", "Revised archive").items.length, 1)
assert.equal(json("meetings", "show", meetingId).transcripts.length, 1)
assert.equal(json("meetings", "show", meetingId, "--backend", "archive").transcripts.length, 1)
assert.equal(
json("meetings", "transcript", meetingId, "--history").items.length,
2,
Expand All @@ -433,7 +433,7 @@ invoke(["meetings", "import", folder, "--json"], 2)
json("config", "set", "permissions", "{}")
writeFileSync(vtt, original.replace("Original invented plan", "Foreign invented boundary"))
json("meetings", "import", folder)
const foreignMeetingId = String(json("meetings", "list").items[0].id)
const foreignMeetingId = String(json("meetings", "list", "--backend", "archive").items[0].id)
assert.notEqual(foreignMeetingId, meetingId)
environment.ZM_PROFILE = "invented-platform"
const { installedMeetingIntegration } = await import("./installed-meeting-integration.mjs")
Expand Down Expand Up @@ -530,7 +530,7 @@ try {
arguments: { project: "RES", account_id: 999 },
})
assert.equal(refusedScope.isError, true)
const result = await callTool("zm_read", { command: "meetings list", arguments: {} })
const result = await callTool("zm_read", { command: "meetings list", arguments: { backend: "archive" } })
assert.notEqual(result.isError, true, JSON.stringify(result))
const firstScope = result.structuredContent
assert.ok(firstScope.items.some((meeting) => String(meeting.id) === meetingId))
Expand All @@ -539,8 +539,10 @@ try {
false,
)
environment.ZM_PROFILE = "invented-foreign-platform"
assert.ok(json("meetings", "list").items.some((meeting) => String(meeting.id) === foreignMeetingId))
const secondResult = await callTool("zm_read", { command: "meetings list", arguments: {} })
assert.ok(
json("meetings", "list", "--backend", "archive").items.some((meeting) => String(meeting.id) === foreignMeetingId),
)
const secondResult = await callTool("zm_read", { command: "meetings list", arguments: { backend: "archive" } })
assert.notEqual(secondResult.isError, true)
const secondScope = secondResult.structuredContent
assert.deepEqual(
Expand Down
Loading