httpd: Remove `radicle_cli` from tests

Signed-off-by: xphoniex <dj.2dixx@gmail.com>
This commit is contained in:
xphoniex 2023-03-07 13:39:13 +00:00 committed by Alexis Sellier
parent 267b0ed312
commit 900796956c
No known key found for this signature in database
1 changed files with 13 additions and 16 deletions

View File

@ -13,9 +13,8 @@ use tower::ServiceExt;
use radicle::cob::issue::Issues; use radicle::cob::issue::Issues;
use radicle::cob::patch::{MergeTarget, Patches}; use radicle::cob::patch::{MergeTarget, Patches};
use radicle::git::raw as git2; use radicle::git::{raw as git2, RefString};
use radicle::storage::ReadStorage; use radicle::storage::ReadStorage;
use radicle_cli::commands::rad_init;
use radicle_crypto::ssh::keystore::MemorySigner; use radicle_crypto::ssh::keystore::MemorySigner;
use crate::api::{auth, Context}; use crate::api::{auth, Context};
@ -88,20 +87,18 @@ pub fn seed(dir: &Path) -> Context {
radicle::Profile::init(rad_home.try_into().unwrap(), PASSWORD.to_owned()).unwrap(); radicle::Profile::init(rad_home.try_into().unwrap(), PASSWORD.to_owned()).unwrap();
// rad init // rad init
rad_init::init( let repo = git2::Repository::open(&workdir).unwrap();
rad_init::Options { let name = "hello-world".to_string();
path: Some(workdir.clone()), let description = "Rad repository for tests".to_string();
name: Some("hello-world".to_string()), let signer = profile.signer().unwrap();
description: Some("Rad repository for tests".to_string()), let branch = RefString::try_from("master").unwrap();
branch: None, radicle::rad::init(
interactive: false.into(), &repo,
setup_signing: false, &name,
set_upstream: false, &description,
announce: false, branch,
track: false, &signer,
verbose: false, &profile.storage,
},
&profile,
) )
.unwrap(); .unwrap();