mirror of
https://github.com/qwjyh/xdbm
synced 2025-02-24 03:57:06 +09:00
debug(CI): clean up debugging codes
This commit is contained in:
parent
8c1abbd563
commit
f31ea1bbce
1 changed files with 1 additions and 35 deletions
36
tests/cli.rs
36
tests/cli.rs
|
@ -2,10 +2,9 @@ mod integrated_test {
|
||||||
use std::{
|
use std::{
|
||||||
fs::{self, DirBuilder, File},
|
fs::{self, DirBuilder, File},
|
||||||
io::{self, BufWriter, Write},
|
io::{self, BufWriter, Write},
|
||||||
ops::Not,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::{Context, Ok, Result};
|
use anyhow::{Ok, Result};
|
||||||
use assert_cmd::{assert::OutputAssertExt, Command};
|
use assert_cmd::{assert::OutputAssertExt, Command};
|
||||||
use git2::Repository;
|
use git2::Repository;
|
||||||
use log::trace;
|
use log::trace;
|
||||||
|
@ -41,39 +40,6 @@ mod integrated_test {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn git_init() -> Result<()> {
|
|
||||||
let temp_dir = assert_fs::TempDir::new()?;
|
|
||||||
setup_gitconfig(temp_dir.path())?;
|
|
||||||
let repo = git2::Repository::init(temp_dir.path())?;
|
|
||||||
eprintln!("{:?}", repo.path());
|
|
||||||
let git_status = std::process::Command::new("git")
|
|
||||||
.args(["status"])
|
|
||||||
.current_dir(temp_dir.path())
|
|
||||||
.spawn()
|
|
||||||
.context("git status")?
|
|
||||||
.wait()
|
|
||||||
.context("didn't complete")?;
|
|
||||||
eprintln!("{}", git_status);
|
|
||||||
let git_config = std::process::Command::new("git")
|
|
||||||
.args(["config", "--list"])
|
|
||||||
.current_dir(temp_dir.path())
|
|
||||||
.spawn()
|
|
||||||
.context("git status")?
|
|
||||||
.wait()
|
|
||||||
.context("didn't complete")?;
|
|
||||||
eprintln!("{}", git_config);
|
|
||||||
let git_config = std::process::Command::new("git")
|
|
||||||
.args(["config", "--list", "--local"])
|
|
||||||
.current_dir(temp_dir.path())
|
|
||||||
.spawn()
|
|
||||||
.context("git status")?
|
|
||||||
.wait()
|
|
||||||
.context("didn't complete")?;
|
|
||||||
eprintln!("{}", git_config);
|
|
||||||
Err(anyhow::anyhow!("finished (error for debug)"))
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn single_device() -> Result<()> {
|
fn single_device() -> Result<()> {
|
||||||
let config_dir = assert_fs::TempDir::new()?;
|
let config_dir = assert_fs::TempDir::new()?;
|
||||||
|
|
Loading…
Reference in a new issue