Set up the git repository in the bats file instead
This commit is contained in:
parent
e48e27fb52
commit
f5f05c0a9e
2 changed files with 6 additions and 5 deletions
|
|
@ -38,11 +38,6 @@ resholve.mkDerivation {
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
shellcheck bin/git-check-assertions test/git-check-assertions.bats
|
shellcheck bin/git-check-assertions test/git-check-assertions.bats
|
||||||
git init
|
|
||||||
git config user.email test
|
|
||||||
git config user.name test
|
|
||||||
git checkout -b main
|
|
||||||
git commit --allow-empty -m "initial"
|
|
||||||
./test/git-check-assertions.bats
|
./test/git-check-assertions.bats
|
||||||
runHook postCheck
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,15 @@ setup() {
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )"
|
DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )"
|
||||||
PATH="$DIR/../bin:$PATH"
|
PATH="$DIR/../bin:$PATH"
|
||||||
|
|
||||||
|
git init
|
||||||
|
git config user.email "john.doe@example.com"
|
||||||
|
git config user.name "John Doe"
|
||||||
|
git checkout -b main
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "can run" {
|
@test "can run" {
|
||||||
|
git commit --allow-empty -m "Initial"
|
||||||
run git-check-assertions
|
run git-check-assertions
|
||||||
assert_success
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue