Skip to content

Commit

Permalink
Fix trivials
Browse files Browse the repository at this point in the history
  • Loading branch information
linw1995 committed Sep 13, 2024
1 parent 594b5b5 commit 2f8a701
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions scripts/cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,17 @@ main() {
if [[ -z "${CI-}" ]]; then
echo ">>> Setting up the project development environment"
docker compose up -d --wait

echo "DATABASE_URL=postgres://postgres:example@${POSTGRES_HOST-localhost}:${POSTGRES_PORT-5432}/${POSTGRES_DB-bearmark}" >.env
echo ">>> Setting up database"
./scripts/bin/diesel migration run
else
echo ">>> Skip setting up the project development environment"

echo "DATABASE_URL=postgres://postgres:example@${POSTGRES_HOST-db}:${POSTGRES_PORT-5432}/${POSTGRES_DB-bearmark}" >.env
echo ">>> Setting up database"
diesel migration run
fi
echo ">>> Setting up database"
./scripts/bin/diesel migration run
echo ">>> Done"
;;
"teardown")
Expand All @@ -80,7 +84,11 @@ main() {
;;
"coverage")
echo ">>> Running tests with coverage"
./scripts/bin/cargo-tarpaulin --out html --skip-clean -- --show-output --test-threads 1 "$@"
if [[ -z "${CI-}" ]]; then
./scripts/bin/cargo-tarpaulin --out html --skip-clean -- --show-output --test-threads 1 "$@"
else
cargo tarpaulin --out html --skip-clean -- --show-output --test-threads 1 "$@"
fi
echo "open file ./tarpaulin-report.html to see coverage report"
cleanup_profraw_files
;;
Expand Down
2 changes: 1 addition & 1 deletion src/api/folder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ pub(crate) mod test {
let res = client.get(uri!(super::list_folders(cwd = _))).dispatch();
assert_eq!(res.status(), Status::Ok);
let folders: Vec<Folder> = res.into_json().unwrap();
assert!(folders.is_empty());
assert!(!folders.is_empty());
assert!(folders.iter().any(|f| f.path == parent_path));
assert!(folders.iter().all(|f| f.path != path));

Expand Down

0 comments on commit 2f8a701

Please sign in to comment.