ARK-Builders / ARK-Builders/ark-core

Test Invariant for `ResourceIndex::update_one()` Consistency

Open
#88 0 comments 0 reactions 1 assignee Claimed by @tareknaser View on GitHub
Dominant language
Rust
Stars
10
Forks
6
PR merge metrics
No merged PRs in 30d

Description

## Description:
We should have tests for `ResourceIndex::update_one()` function (added in #85) to ensure that any sequence of `update_one` calls results in the same output as running `update_all` on the entire directory.

The process would involve starting with an empty directory, randomly generating an update (creation, modification, or deletion if applicable), applying `update_one`, and then building a new index from the current directory state. The results from both should be consistent. Property-based testing could also be explored for this case.

Relevant conversation: https://github.com/ARK-Builders/ark-core/pull/85#discussion_r1740084329

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.