refactor(tvix/store/pathinfo): test with PathInfoService directly
Since cl/…, a PathInfoService doesn't need to implement `calculate_nar`
anymore, so most of them don't actually have a handle to a
{Blob,Directory}Service anymore.
This means, we can simplify the construction of them for test cases
a lot.
Change-Id: I100e9e1c9b00a049b4d6136c57aad4cdb04461c6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11691
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
This commit is contained in:
parent
d4978521b0
commit
bc42c355cf
4 changed files with 58 additions and 71 deletions
|
|
@ -67,6 +67,22 @@ pub struct BigtableParameters {
|
|||
app_profile_id: String,
|
||||
}
|
||||
|
||||
impl BigtableParameters {
|
||||
#[cfg(test)]
|
||||
pub fn default_for_tests() -> Self {
|
||||
Self {
|
||||
project_id: "project-1".into(),
|
||||
instance_name: "instance-1".into(),
|
||||
is_read_only: false,
|
||||
channel_size: default_channel_size(),
|
||||
timeout: default_timeout(),
|
||||
table_name: "table-1".into(),
|
||||
family_name: "cf1".into(),
|
||||
app_profile_id: default_app_profile_id(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn default_app_profile_id() -> String {
|
||||
"default".to_owned()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue