oxidecomputer / oxidecomputer/omicron

want "leakage" tests for verifying delete behavior

Open
#1,842 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Testing & Analysis
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

It'd be useful to have the Nexus integration tests verify that deleting resources deletes everything that it should. Deleting a Silo for example winds up deleting lots of different kinds of objects and it'd be easy to get this wrong. One thought that would make it hard to get this wrong: have something that counts all items in all database tables and compares the results before and after a test run. Fail if those numbers aren't the same. (In practice, we might need an allowlist of items that are expected to stick around.) Most tests today aren't structured to clean up after themselves, so we couldn't apply this to all tests, but it'd be nice if a test could opt into this behavior.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Nexus integration tests that delete a Silo and identify a suitable test to opt into leakage checking. Map the database tables and resources affected by that deletion, then define the expected persistent-item allowlist; done means the test detects unexpected leftovers without flagging allowed items.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, databases, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.