Files
radicle-git/git-storage/t/Cargo.toml
T
Jorge Iglesias Garcia f6b72dce85 git-storage: add ODB tests
We add tests for ODB functionality, as well as a new `TreeBuilder`
Struct to make building git trees easier (see below).

The `git2::TreeBuilder` can be a pain to use since it has a lifetime
that is tied to the `git2::Repository`. This was causing issues when
trying to write generators for property tests.

Instead, define a custom TreeBuilder which is a defunctionalised list
operations that represent the `insert` and `remove` methods on
`git2::TreeBuilder`.

The implementation of writing a tree then becomes converting the
custom `TreeBuilder` into a `git2::TreeBuilder`.

Signed-off-by: Jorge Iglesias Garcia <me@jorgeig.com>
2022-10-24 16:52:56 +08:00

48 lines
780 B
TOML

[package]
name = "git-storage-test"
version = "0.1.0"
edition = "2021"
license = "GPL-3.0-or-later"
publish = false
[lib]
doctest = false
test = true
doc = false
[features]
test = []
[dependencies]
proptest = "1"
[dependencies.git-storage]
path = ".."
[dependencies.git2]
version = "0.15.0"
default-features = false
features = ["vendored-libgit2"]
[dependencies.radicle-git-ext]
path = "../../radicle-git-ext/"
[dependencies.test-helpers]
path = "../../test/test-helpers"
[dev-dependencies.uuid]
version = "1"
features = ["v4"]
[dev-dependencies.git-ext-test]
path = "../../radicle-git-ext/t"
features = ["test"]
[dev-dependencies.git-ref-format]
path = "../../git-ref-format"
[dev-dependencies.git-ref-format-test]
path = "../../git-ref-format/t"
features = ["test"]