Skip to content

Indexer: crate builder for tests, and crate-to-HTTP tests in the top-level test folder #94

Open

Description

@johnf

Parent

Spec: indexer redesign

What to build

A prefactor so the new indexer's tests can state their crates inline. Everything here still passes against today's indexer, because it reads both spellings.

  • A small crate builder in the top-level test folder. A test describes the collections, objects, files, people and licences it needs, and gets a crate it can put in a temporary repository.
  • The crate-to-HTTP tests move out of the source tree into the top-level test folder and keep their assertions: search, root collection, damaged crate, collection cycle, search total, licence, Oni and app.
  • The fixture crates move to the ldac:/pcdm: spellings (today they use the bare communicationMode and indexableText). Fixtures only the moved tests need are replaced by builder crates. Keep only the realistic crates that Import and bootstrap need.
  • The sub_col_2.txt fixture (a File entity with no bytes behind it, which no test names) becomes the named builder case "a file described but not held".

Acceptance criteria

  • The crate builder exists, and at least the moved crate-to-HTTP tests use it where a fixture isn't needed.
  • The crate-to-HTTP tests live in the top-level test folder with their assertions unchanged.
  • No fixture crate uses the bare communicationMode, indexableText, memberOf or hasMember spellings.
  • "A file described but not held" is a named case, and sub_col_2.txt is gone.
  • pnpm test and pnpm lint pass, and coverage doesn't drop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions