IF Commons GitHub

Tests of AnyFS Google Drive

0003Active

0003-anyfs-gdrive-tests · owner if · domain commons

Requirements

FR-001checkpassing

The store MUST pass every case of the conformance suite of AnyFS that its capabilities call for (all but those that need cas) on a Drive made in process, with a service that gives sha256Checksum and with one that does not, including the race of writers that expect no object.

Enforced (check): .github: cd commons/anyfs-gdrive && bun run verify — suite/conformance.test.ts

Proved by: anyfs-gdrive/suite/conformance.test.ts

Tests: passed: suite/conformance.test.ts the store passes every case of the conformance suite of AnyFS that its capabilities call f; passed: suite/conformance.test.ts the store passes every case of the conformance suite of AnyFS that its capabilities call f

FR-002checkpassing

The files, listings and errors that Drive is documented to answer with MUST be decoded by the store as they are written in the documentation (fixtures made from the documentation, labelled as such; none is a recording of a live service).

Enforced (check): .github: cd commons/anyfs-gdrive && bun run verify — suite/conformance.test.ts

Proved by: anyfs-gdrive/suite/fixtures.test.ts

Tests: passed: suite/fixtures.test.ts a file is read as a blob with its digest, a folder, or something of Google that has no byt; passed: suite/fixtures.test.ts a list of files is read with the token of the next page, one that is not a list is a reaso; passed: suite/fixtures.test.ts the error objects of the documentation are read for their reason and message and are the k

FR-003checkpartly run

A test of the store on a live account MUST exist, MUST be skipped unless ANYFS_GDRIVE_TEST_TOKEN and ANYFS_GDRIVE_TEST_FOLDER are set, MUST work only in a folder of its own that it makes and removes, and its header MUST say that it has not been run where it has not.

Enforced (check): .github: cd commons/anyfs-gdrive && bun run verify — suite/conformance.test.ts

Proved by: anyfs-gdrive/suite/live.test.ts

Tests: skipped: suite/live.test.ts the store passes the conformance suite of AnyFS on a live account, in a folder of its own

Acceptance scenarios

  1. Given no variable of the live run, When the suite runs, Then the live test is skipped with its reason, per FR-003.

Out of scope

  • The live run itself (it needs an account of the owner).

Edge cases

  • A token in the environment of a run is read once and never written to a message, per FR-003.

Assumptions

  • The fake is written from the documentation of the Drive API and is as faithful as that is.

Open questions

  • None.

Key entities

  • Fake Drive - the in-process service of the tests.

Success criteria

SC-001success criterion

A change to the store is proved without a network, and the live run is one command away.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No implementation language beyond what the requirement needs
  • [x] Out of scope is stated

Titles, headings, exports, tables, columns and requirements. Esc closes.