| 1 | import { execFileSync } from 'node:child_process'; |
| 2 | import { mkdtempSync, rmSync |
| 3 | import { tmpdir } |
| 4 | import path from 'node:path |
| 5 | import { Readable } |
| 6 | import { buffer } |
| 7 | |
| 8 | import { createDatabase, type |
| 9 | import { ConfigService } |
| 10 | import { inArray } |
| 11 | import { migrate } |
| 12 | import { |
| 13 | afterAll, |
| 14 | afterEach, |
| 15 | beforeAll, |
| 16 | beforeEach, |
| 17 | describe, |
| 18 | expect, |
| 19 | it, |
| 20 | } from 'vitest'; |
| 21 | |
| 22 | import { InvalidCursorError } |
| 23 | import { InMemoryWalStore } |
| 24 | import { bufferBody } |
| 25 | import { listTags } |
| 26 | import { ZERO_OID } |
| 27 | import { |
| 28 | InvalidAssetNameError, |
| 29 | InvalidTagNameError, |
| 30 | ReleaseAlreadyExistsError, |
| 31 | ReleaseAssetExistsError, |
| 32 | ReleaseAssetNotFoundError, |
| 33 | ReleaseAssetTooLargeError, |
| 34 | ReleaseNotFoundError, |
| 35 | TagNotFoundError, |
| 36 | TagTargetNotFoundError, |
| 37 | } from '../../lib/releases/releases.errors.js'; |
| 38 | import { InMemoryS3 } |
| 39 | import { |
| 40 | ContentLengthRequiredError, |
| 41 | StorageQuotaExceededError, |
| 42 | } from '../../lib/storage/storage.errors.js'; |
| 43 | import { UserNotFoundError } |
| 44 | import { RepositoryMaterializerService } |
| 45 | import { RepositoryAccessService } |
| 46 | import type { RepositoryStorageService |
| 47 | import { PushTransactionService } |
| 48 | import type { WalStoreService |
| 49 | import type { S3Service |
| 50 | import { StorageQuotaService } |
| 51 | import { UsersService } |
| 52 | import { StorageService } |
| 53 | import { ReleaseAssetsService } |
| 54 | import { ReleasesService } |
| 55 | |
| 56 | const CONNECTION = process |
| 57 | const MIGRATIONS = path |
| 58 | import.meta.dirname, |
| 59 | '../../../../../packages/db/drizzle', |
| 60 | ); |
| 61 | |
| 62 | const OWNER = ' |
| 63 | const READER = ' |
| 64 | |
| 65 | function git(cwd: |
| 66 | const env = |
| 67 | delete env.GIT_DIR; |
| 68 | return execFileSync('git |
| 69 | } |
| 70 | |
| 71 | // Needs a throwaway Postgres; the suite is skipped without one. |
| 72 | describe.skipIf(!CONNECTION |
| 73 | let db: |
| 74 | let pool: |
| 75 | let root: |
| 76 | let source: |
| 77 | let cache: |
| 78 | let releases: |
| 79 | let assets: |
| 80 | let s3: |
| 81 | let quota: |
| 82 | let pushes: |
| 83 | let repository: |
| 84 | let first: |
| 85 | let second: |
| 86 | |
| 87 | const owner = |
| 88 | const reader = |
| 89 | const anonymous = |
| 90 | |
| 91 | /** Rebuilds the quota and asset services as an instance configured with `env` would have them. */ |
| 92 | function limits(env |
| 93 | quota = new |
| 94 | assets = new |
| 95 | db, |
| 96 | new RepositoryAccessService(db |
| 97 | s3 as unknown |
| 98 | quota, |
| 99 | ); |
| 100 | } |
| 101 | |
| 102 | function upload( |
| 103 | releaseId: string, |
| 104 | name: string, |
| 105 | bytes: Buffer |
| 106 | as: { |
| 107 | ) { |
| 108 | return assets.upload |
| 109 | ...owner, |
| 110 | ...as, |
| 111 | releaseId, |
| 112 | name, |
| 113 | type: 'application/zip', |
| 114 | contentLength: String(bytes |
| 115 | body: Readable.from |
| 116 | }); |
| 117 | } |
| 118 | |
| 119 | async function commitAndLog |
| 120 | writeFileSync(path.join |
| 121 | git(source, ' |
| 122 | git(source, ' |
| 123 | const after = |
| 124 | |
| 125 | await pushes.commitPush |
| 126 | repoId: repository.id |
| 127 | transitions: [ |
| 128 | { |
| 129 | ref: 'refs/heads/main', |
| 130 | oldOid: before ? |
| 131 | newOid: Buffer.from |
| 132 | }, |
| 133 | ], |
| 134 | body: bufferBody( |
| 135 | execFileSync('git', |
| 136 | cwd: source, |
| 137 | input: before ? |
| 138 | }), |
| 139 | ), |
| 140 | packOffset: 0, |
| 141 | }); |
| 142 | return after; |
| 143 | } |
| 144 | |
| 145 | beforeAll(async () |
| 146 | ({ db, pool |
| 147 | await migrate(db |
| 148 | }); |
| 149 | |
| 150 | beforeEach(async () |
| 151 | root = mkdtempSync( |
| 152 | source = path. |
| 153 | cache = path. |
| 154 | execFileSync('git', |
| 155 | git(source, ' |
| 156 | git(source, ' |
| 157 | execFileSync('git', |
| 158 | |
| 159 | const store = |
| 160 | pushes = new |
| 161 | s3 = new |
| 162 | limits({}); |
| 163 | releases = new |
| 164 | db, |
| 165 | new RepositoryAccessService(db |
| 166 | new RepositoryMaterializerService(store |
| 167 | getRepoPath: async () |
| 168 | } as unknown as |
| 169 | pushes, |
| 170 | new UsersService(db |
| 171 | assets, |
| 172 | ); |
| 173 | |
| 174 | await db |
| 175 | .delete(schema.user |
| 176 | .where(inArray(schema |
| 177 | await db.insert |
| 178 | { |
| 179 | id: OWNER, |
| 180 | name: 'Owner', |
| 181 | email: 'release-owner@example.com', |
| 182 | username: 'release-owner', |
| 183 | }, |
| 184 | { |
| 185 | id: READER, |
| 186 | name: 'Reader', |
| 187 | email: 'release-reader@example.com', |
| 188 | username: 'release-reader', |
| 189 | }, |
| 190 | ]); |
| 191 | [repository] = await |
| 192 | .insert(schema.repository |
| 193 | .values({ |
| 194 | name: 'app', |
| 195 | slug: 'app', |
| 196 | ownerId: OWNER, |
| 197 | visibility: 'public', |
| 198 | }) |
| 199 | .returning(); |
| 200 | |
| 201 | first = await |
| 202 | second = await |
| 203 | }); |
| 204 | |
| 205 | afterEach(() => |
| 206 | |
| 207 | afterAll(async () |
| 208 | await db |
| 209 | .delete(schema.user |
| 210 | .where(inArray(schema |
| 211 | await pool?.end |
| 212 | }); |
| 213 | |
| 214 | it('creates a missing tag at the default branch, or at a named target', |
| 215 | const onDefault = |
| 216 | ...owner, |
| 217 | body: { tagName: ' |
| 218 | }); |
| 219 | const onFirst = |
| 220 | ...owner, |
| 221 | body: { tagName: ' |
| 222 | }); |
| 223 | |
| 224 | expect(onDefault).toMatchObject |
| 225 | tagName: 'v2.0', |
| 226 | name: 'Two', |
| 227 | commitSha: second, |
| 228 | authorUsername: 'release-owner', |
| 229 | isDraft: false, |
| 230 | viewerCanEdit: true, |
| 231 | }); |
| 232 | expect(onDefault.publishedAt |
| 233 | expect(onFirst).toMatchObject |
| 234 | |
| 235 | // created annotated, so the tag is dated now rather than by its commit |
| 236 | const created = |
| 237 | expect(created.map |
| 238 | expect.arrayContaining([ |
| 239 | ['v2.0', 'Two' |
| 240 | ['release/v1.0', 'release/v1.0' |
| 241 | ]), |
| 242 | ); |
| 243 | for (const tag |
| 244 | expect(Date.now |
| 245 | } |
| 246 | await expect( |
| 247 | releases.getReleaseByTag({ |
| 248 | ).resolves.toMatchObject( |
| 249 | }); |
| 250 | |
| 251 | it('attaches to an existing tag and ignores the target', |
| 252 | await releases.createRelease |
| 253 | ...owner, |
| 254 | body: { tagName: ' |
| 255 | }); |
| 256 | await releases.deleteRelease |
| 257 | ...owner, |
| 258 | id: (await releases |
| 259 | }); |
| 260 | |
| 261 | const again = |
| 262 | ...owner, |
| 263 | body: { tagName: ' |
| 264 | }); |
| 265 | expect(again.commitSha |
| 266 | }); |
| 267 | |
| 268 | it('refuses a bad tag name, an unknown target, a duplicate and a reader', |
| 269 | await expect( |
| 270 | releases.createRelease({ |
| 271 | ).rejects.toBeInstanceOf( |
| 272 | await expect( |
| 273 | releases.createRelease({ |
| 274 | ...owner, |
| 275 | body: { tagName: ' |
| 276 | }), |
| 277 | ).rejects.toBeInstanceOf( |
| 278 | |
| 279 | await releases.createRelease |
| 280 | await expect( |
| 281 | releases.createRelease({ |
| 282 | ).rejects.toBeInstanceOf( |
| 283 | |
| 284 | await expect( |
| 285 | releases.createRelease({ |
| 286 | ).rejects.toThrow() |
| 287 | }); |
| 288 | |
| 289 | it('hides drafts from readers and stamps publishedAt once, on first publish', |
| 290 | const draft = |
| 291 | ...owner, |
| 292 | body: { tagName: ' |
| 293 | }); |
| 294 | expect(draft.publishedAt |
| 295 | |
| 296 | await expect( |
| 297 | releases.listReleases({ |
| 298 | ).resolves.toMatchObject( |
| 299 | await expect( |
| 300 | releases.getReleaseByTag({ |
| 301 | ).rejects.toBeInstanceOf( |
| 302 | |
| 303 | const published = |
| 304 | ...owner, |
| 305 | id: draft.id |
| 306 | body: { isDraft: false |
| 307 | }); |
| 308 | expect(published).toMatchObject |
| 309 | expect(published.publishedAt |
| 310 | |
| 311 | const redrafted = |
| 312 | ...owner, |
| 313 | id: draft.id |
| 314 | body: { isDraft: true |
| 315 | }); |
| 316 | expect(redrafted).toMatchObject |
| 317 | isDraft: true, |
| 318 | name: null, |
| 319 | publishedAt: published.publishedAt |
| 320 | }); |
| 321 | }); |
| 322 | |
| 323 | it('marks the newest published non-prerelease as latest', |
| 324 | await expect(releases |
| 325 | ReleaseNotFoundError, |
| 326 | ); |
| 327 | |
| 328 | await releases.createRelease |
| 329 | await releases.createRelease |
| 330 | ...owner, |
| 331 | body: { tagName: ' |
| 332 | }); |
| 333 | await releases.createRelease |
| 334 | ...owner, |
| 335 | body: { tagName: ' |
| 336 | }); |
| 337 | |
| 338 | await expect(releases |
| 339 | tagName: 'v1', |
| 340 | isLatest: true, |
| 341 | }); |
| 342 | const { releases: |
| 343 | ...owner, |
| 344 | query: {}, |
| 345 | }); |
| 346 | expect( |
| 347 | listed.map((release |
| 348 | ).toEqual([ |
| 349 | ['v3', false], |
| 350 | ['v2-rc', false], |
| 351 | ['v1', true], |
| 352 | ]); |
| 353 | }); |
| 354 | |
| 355 | it('pages newest first and rejects a malformed cursor', |
| 356 | for (const tagName |
| 357 | await releases.createRelease |
| 358 | } |
| 359 | |
| 360 | const page = |
| 361 | expect(page.releases |
| 362 | |
| 363 | const next = |
| 364 | ...owner, |
| 365 | query: { limit: 2 |
| 366 | }); |
| 367 | expect(next).toMatchObject |
| 368 | releases: [{ tagName: |
| 369 | nextCursor: null, |
| 370 | }); |
| 371 | |
| 372 | await expect( |
| 373 | releases.listReleases({ |
| 374 | ).rejects.toBeInstanceOf( |
| 375 | }); |
| 376 | |
| 377 | it('pages by offset in either order, by creation or name, with a total that leaves drafts out for readers', |
| 378 | for (const [tagName |
| 379 | ['a', 'Zulu' |
| 380 | ['b', null], |
| 381 | ['c', 'Alpha' |
| 382 | ] as const) |
| 383 | await releases.createRelease |
| 384 | ...owner, |
| 385 | body: { tagName, |
| 386 | }); |
| 387 | } |
| 388 | await releases.createRelease |
| 389 | ...owner, |
| 390 | body: { tagName: ' |
| 391 | }); |
| 392 | |
| 393 | const created = |
| 394 | ...owner, |
| 395 | offset: 1, |
| 396 | limit: 2, |
| 397 | order: { field: ' |
| 398 | }); |
| 399 | expect(created.total |
| 400 | expect(created.releases |
| 401 | 'c', |
| 402 | 'b', |
| 403 | ]); |
| 404 | |
| 405 | // a nameless release sorts by its tag |
| 406 | const byName = |
| 407 | ...reader, |
| 408 | offset: 0, |
| 409 | limit: 10, |
| 410 | order: { field: ' |
| 411 | }); |
| 412 | expect(byName.total |
| 413 | expect(byName.releases |
| 414 | 'c', |
| 415 | 'b', |
| 416 | 'a', |
| 417 | ]); |
| 418 | }); |
| 419 | |
| 420 | it('reads a release by id, hiding a draft from readers', |
| 421 | const draft = |
| 422 | ...owner, |
| 423 | body: { tagName: ' |
| 424 | }); |
| 425 | await expect( |
| 426 | releases.getRelease({ |
| 427 | ).resolves.toMatchObject( |
| 428 | await expect( |
| 429 | releases.getRelease({ |
| 430 | ).rejects.toBeInstanceOf( |
| 431 | }); |
| 432 | |
| 433 | it('deletes a tag and keeps its release, refusing a missing tag and a reader', |
| 434 | await releases.createRelease |
| 435 | await expect( |
| 436 | releases.deleteTag({ |
| 437 | ).rejects.toThrow() |
| 438 | |
| 439 | await releases.deleteTag |
| 440 | await expect( |
| 441 | releases.getReleaseByTag({ |
| 442 | ).resolves.toMatchObject( |
| 443 | await expect( |
| 444 | releases.deleteTag({ |
| 445 | ).rejects.toBeInstanceOf( |
| 446 | }); |
| 447 | |
| 448 | it('keeps the tag when a release is deleted, and reports a deleted tag as no commit', |
| 449 | const release = |
| 450 | ...owner, |
| 451 | body: { tagName: ' |
| 452 | }); |
| 453 | await releases.deleteRelease |
| 454 | await expect( |
| 455 | releases.deleteRelease({ |
| 456 | ).rejects.toBeInstanceOf( |
| 457 | |
| 458 | const again = |
| 459 | ...owner, |
| 460 | body: { tagName: ' |
| 461 | }); |
| 462 | await pushes.commitPush |
| 463 | repoId: repository.id |
| 464 | transitions: [ |
| 465 | { |
| 466 | ref: 'refs/tags/v1', |
| 467 | oldOid: Buffer.from |
| 468 | newOid: ZERO_OID, |
| 469 | }, |
| 470 | ], |
| 471 | body: bufferBody(Buffer |
| 472 | packOffset: 0, |
| 473 | }); |
| 474 | |
| 475 | await expect( |
| 476 | releases.getReleaseByTag({ |
| 477 | ).resolves.toMatchObject( |
| 478 | await expect( |
| 479 | releases.updateRelease({ |
| 480 | ).rejects.toBeInstanceOf( |
| 481 | }); |
| 482 | |
| 483 | describe('assets', |
| 484 | let release: |
| 485 | const zip = |
| 486 | |
| 487 | beforeEach(async () |
| 488 | release = await |
| 489 | ...owner, |
| 490 | body: { tagName: ' |
| 491 | }); |
| 492 | }); |
| 493 | |
| 494 | it('stores, lists, serves and counts an asset, then deletes it', |
| 495 | const asset = |
| 496 | expect(asset).toMatchObject |
| 497 | name: 'app.zip', |
| 498 | contentType: 'application/zip', |
| 499 | size: zip.length, |
| 500 | downloadCount: 0, |
| 501 | }); |
| 502 | |
| 503 | await expect( |
| 504 | releases.getReleaseByTag({ |
| 505 | ).resolves.toMatchObject( |
| 506 | |
| 507 | const download = |
| 508 | ...anonymous, |
| 509 | asset: { tagName: ' |
| 510 | }); |
| 511 | await expect(buffer |
| 512 | await expect( |
| 513 | releases.getReleaseByTag({ |
| 514 | ).resolves.toMatchObject( |
| 515 | |
| 516 | await assets.delete |
| 517 | expect(s3.objects |
| 518 | await expect( |
| 519 | assets.download({ |
| 520 | ...anonymous, |
| 521 | asset: { tagName: ' |
| 522 | }), |
| 523 | ).rejects.toBeInstanceOf( |
| 524 | await expect( |
| 525 | assets.delete({ |
| 526 | ).rejects.toBeInstanceOf( |
| 527 | }); |
| 528 | |
| 529 | it('refuses a path for a name, a missing length, an oversized file, a duplicate and a reader', |
| 530 | await expect( |
| 531 | upload(release.id |
| 532 | ).rejects.toBeInstanceOf( |
| 533 | await expect( |
| 534 | assets.upload({ |
| 535 | ...owner, |
| 536 | releaseId: release.id |
| 537 | name: 'app.zip', |
| 538 | type: undefined, |
| 539 | contentLength: undefined, |
| 540 | body: Readable.from |
| 541 | }), |
| 542 | ).rejects.toBeInstanceOf( |
| 543 | |
| 544 | limits({ RELEASE_ASSET_MAX_BYTES: |
| 545 | await expect(upload |
| 546 | ReleaseAssetTooLargeError, |
| 547 | ); |
| 548 | |
| 549 | limits({}); |
| 550 | await upload(release |
| 551 | await expect(upload |
| 552 | ReleaseAssetExistsError, |
| 553 | ); |
| 554 | await expect( |
| 555 | upload(release.id |
| 556 | ).rejects.toThrow() |
| 557 | await expect( |
| 558 | upload('release_missing', |
| 559 | ).rejects.toBeInstanceOf( |
| 560 | }); |
| 561 | |
| 562 | it('drops the reservation when the upload fails, so the name and the space are free again', |
| 563 | s3.failNextPut = |
| 564 | await expect(upload |
| 565 | 'connection reset', |
| 566 | ); |
| 567 | await expect(quota |
| 568 | await expect(upload |
| 569 | name: 'app.zip', |
| 570 | }); |
| 571 | }); |
| 572 | |
| 573 | it('holds an account to its quota, counting live reservations but not lapsed ones', |
| 574 | limits({ ASSET_STORAGE_QUOTA_BYTES: |
| 575 | await upload(release |
| 576 | |
| 577 | // an upload in flight elsewhere holds its space |
| 578 | const [inFlight] |
| 579 | .insert(schema.releaseAsset |
| 580 | .values({ |
| 581 | releaseId: release.id |
| 582 | repositoryId: repository.id |
| 583 | name: 'b.zip', |
| 584 | contentType: 'application/zip', |
| 585 | size: zip.length, |
| 586 | }) |
| 587 | .returning(); |
| 588 | await expect(upload |
| 589 | StorageQuotaExceededError, |
| 590 | ); |
| 591 | |
| 592 | // one that died a day ago does not, and no longer holds its name either |
| 593 | await db |
| 594 | .update(schema.releaseAsset |
| 595 | .set({ createdAt: |
| 596 | .where(inArray(schema |
| 597 | await expect(upload |
| 598 | name: 'b.zip', |
| 599 | }); |
| 600 | await expect(quota |
| 601 | zip.length * 2 |
| 602 | ); |
| 603 | }); |
| 604 | |
| 605 | it('lets concurrent uploads fill the quota exactly, never past it', |
| 606 | limits({ ASSET_STORAGE_QUOTA_BYTES: |
| 607 | const results = |
| 608 | ['a', 'b' |
| 609 | upload(release.id |
| 610 | ), |
| 611 | ); |
| 612 | expect( |
| 613 | results.filter((result |
| 614 | ).toHaveLength(2); |
| 615 | }); |
| 616 | |
| 617 | it('bills an organization repository to the organization, not its owner', |
| 618 | limits({ ASSET_STORAGE_QUOTA_BYTES: |
| 619 | await upload(release |
| 620 | |
| 621 | await db.insert |
| 622 | id: 'org_release', |
| 623 | name: 'Release Org', |
| 624 | slug: 'release-org', |
| 625 | createdAt: new Date |
| 626 | }); |
| 627 | try { |
| 628 | await db.insert |
| 629 | id: 'member_release', |
| 630 | organizationId: 'org_release', |
| 631 | userId: OWNER, |
| 632 | role: 'owner', |
| 633 | createdAt: new Date |
| 634 | }); |
| 635 | await db |
| 636 | .update(schema.repository |
| 637 | .set({ organizationId: |
| 638 | .where(inArray(schema |
| 639 | |
| 640 | await expect(quota |
| 641 | 0, |
| 642 | ); |
| 643 | await expect( |
| 644 | quota.usageOf({ |
| 645 | ).resolves.toBe( |
| 646 | } finally { |
| 647 | await db |
| 648 | .delete(schema.organization |
| 649 | .where(inArray(schema |
| 650 | } |
| 651 | }); |
| 652 | |
| 653 | it('labels an asset, serves it by id, and renames it unless the name is taken', |
| 654 | const asset = |
| 655 | ...owner, |
| 656 | releaseId: release.id |
| 657 | name: 'app.zip', |
| 658 | label: ' Linux build ', |
| 659 | type: 'application/zip', |
| 660 | contentLength: String(zip |
| 661 | body: Readable.from |
| 662 | }); |
| 663 | const other = |
| 664 | const [row] |
| 665 | .select({ label: |
| 666 | .from(schema.releaseAsset |
| 667 | .where(inArray(schema |
| 668 | expect(row).toEqual |
| 669 | |
| 670 | const byId = |
| 671 | ...anonymous, |
| 672 | asset: { id: asset |
| 673 | }); |
| 674 | await expect(buffer |
| 675 | |
| 676 | await expect( |
| 677 | assets.update({ |
| 678 | ).rejects.toBeInstanceOf( |
| 679 | await expect( |
| 680 | assets.update({ |
| 681 | ).rejects.toBeInstanceOf( |
| 682 | await expect( |
| 683 | assets.update({ |
| 684 | ).rejects.toBeInstanceOf( |
| 685 | await expect( |
| 686 | assets.update({ |
| 687 | ).rejects.toThrow() |
| 688 | |
| 689 | await expect( |
| 690 | assets.update({ |
| 691 | ...owner, |
| 692 | assetId: asset.id |
| 693 | name: 'app-linux.zip', |
| 694 | label: '', |
| 695 | }), |
| 696 | ).resolves.toMatchObject( |
| 697 | const [renamed] |
| 698 | .select({ label: |
| 699 | .from(schema.releaseAsset |
| 700 | .where(inArray(schema |
| 701 | expect(renamed).toEqual |
| 702 | // keeping its own name is not a clash |
| 703 | await expect( |
| 704 | assets.update({ |
| 705 | ).resolves.toMatchObject( |
| 706 | }); |
| 707 | |
| 708 | it('hides a draft release asset from readers', |
| 709 | const draft = |
| 710 | ...owner, |
| 711 | body: { tagName: ' |
| 712 | }); |
| 713 | await upload(draft |
| 714 | |
| 715 | await expect( |
| 716 | assets.download({ |
| 717 | ...reader, |
| 718 | asset: { tagName: ' |
| 719 | }), |
| 720 | ).rejects.toBeInstanceOf( |
| 721 | await expect( |
| 722 | assets.download({ |
| 723 | ...owner, |
| 724 | asset: { tagName: ' |
| 725 | }), |
| 726 | ).resolves.toMatchObject( |
| 727 | }); |
| 728 | |
| 729 | it('removes stored files with their release', |
| 730 | await upload(release |
| 731 | await releases.deleteRelease |
| 732 | expect(s3.objects |
| 733 | }); |
| 734 | |
| 735 | it('reports usage to the account itself and its organization members only', |
| 736 | limits({ STORAGE_QUOTA_BYTES: |
| 737 | await upload(release |
| 738 | const storage = |
| 739 | |
| 740 | await expect(storage |
| 741 | usedBytes: 0, |
| 742 | quotaBytes: 1024 ** 3, |
| 743 | maxAssetBytes: 2 * 1024 |
| 744 | fork: { usedBytes: 0 |
| 745 | lfs: { usedBytes: 0 |
| 746 | asset: { usedBytes: zip |
| 747 | }); |
| 748 | await expect( |
| 749 | storage.usage('release-owner |
| 750 | ).rejects.toBeInstanceOf( |
| 751 | }); |
| 752 | }); |
| 753 | }); |