IF Commons GitHub

Tests of AnyFS OneDrive

0003Active

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

Requirements

FR-001checkpassing

The store MUST pass every case of the conformance suite of AnyFS on a Graph made in process, with a service that gives the hash of the contents and with one that does not.

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

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

Tests: passed: suite/conformance.test.ts the store passes every case of the conformance suite of AnyFS on a Graph that does not giv; passed: suite/conformance.test.ts the store passes every case of the conformance suite of AnyFS on a Graph that gives the di

FR-002checkpassing

The items, errors and listings that Graph 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-onedrive && bun run verify — suite/conformance.test.ts

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

Tests: passed: suite/fixtures.test.ts a drive item is read as a file with its hashes where Graph gives them, a folder, or someth; passed: suite/fixtures.test.ts a page of children is read with its link to the next page, and a page that is not one is a; passed: suite/fixtures.test.ts the error objects of the documentation are read for their code and message, with Retry-Aft

FR-003checkpartly run

A test of the store on a live tenant MUST exist, MUST be skipped unless ANYFS_ONEDRIVE_TEST_TOKEN and ANYFS_ONEDRIVE_TEST_DRIVE 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-onedrive && bun run verify — suite/conformance.test.ts

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

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

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 a tenant and 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 Graph and is as faithful as that is.

Open questions

  • None.

Key entities

  • Fake Graph - 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.