From b4816004a18898aed5b5f401505eb515eba89e9f Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 6 May 2021 13:58:23 +0200 Subject: [PATCH] tests: abuild-keygen: create a fake git test what happens when git has no user.email configured --- tests/abuild-keygen.bats | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/abuild-keygen.bats b/tests/abuild-keygen.bats index e90d7f9..e7b8fae 100644 --- a/tests/abuild-keygen.bats +++ b/tests/abuild-keygen.bats @@ -3,8 +3,16 @@ setup() { export ABUILD_SHAREDIR="$PWD/.." tmpdir="$BATS_TMPDIR"/abuild-keygen export ABUILD_USERDIR="$tmpdir"/user - export PACKAGER="Test User " mkdir -p "$ABUILD_USERDIR" + + # provide a fake git + mkdir -p "$tmpdir"/bin + cat >"$tmpdir"/bin/git <<-EOF + #!/bin/sh + exit 1 + EOF + chmod +x "$tmpdir"/bin/git + export PATH="$tmpdir/bin:$PATH" } teardown() {