diff --git a/test/test-locks.sh b/test/test-locks.sh index 43f1a94a..f3e75f38 100755 --- a/test/test-locks.sh +++ b/test/test-locks.sh @@ -19,6 +19,22 @@ begin_test "list a single lock" ) end_test +begin_test "list a single lock (--json)" +( + set -e + + setup_remote_repo_with_file "locks_list_single_json" "f_json.dat" + + GITLFSLOCKSENABLED=1 git lfs lock "f_json.dat" | tee lock.log + + id=$(grep -oh "\((.*)\)" lock.log | tr -d "()") + assert_server_lock $id + + GITLFSLOCKSENABLED=1 git lfs locks --json --path "f_json.dat" | tee locks.log + grep "\"path\":\"f_json.dat\"" locks.log +) +end_test + begin_test "list locks with a limit" ( set -e