mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-02-13 09:58:13 +00:00
tests: abuild-keygen: create a fake git
test what happens when git has no user.email configured
This commit is contained in:
parent
e520288df5
commit
b4816004a1
@ -3,8 +3,16 @@ setup() {
|
|||||||
export ABUILD_SHAREDIR="$PWD/.."
|
export ABUILD_SHAREDIR="$PWD/.."
|
||||||
tmpdir="$BATS_TMPDIR"/abuild-keygen
|
tmpdir="$BATS_TMPDIR"/abuild-keygen
|
||||||
export ABUILD_USERDIR="$tmpdir"/user
|
export ABUILD_USERDIR="$tmpdir"/user
|
||||||
export PACKAGER="Test User <user@example.com>"
|
|
||||||
mkdir -p "$ABUILD_USERDIR"
|
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() {
|
teardown() {
|
||||||
|
Loading…
Reference in New Issue
Block a user