Add trigger by URL tests for forgehook interop

This commit is contained in:
southerntofu 2020-10-05 17:30:19 +02:00
parent ec018c892f
commit 977a20da88
1 changed files with 17 additions and 0 deletions

View File

@ -92,6 +92,23 @@ function clean {
[[ "$TIME" != "$NEWTIME" ]]
}
@test "update by source URL works" {
echo "FALSESOURCE" > "$FORGEBUILDDIR"/branch.source
$FORGEBUILD -b $FORGEBUILDDIR "$GITREPO"
[ -f /tmp/forgebuild-host ]
[ -f /tmp/forgebuild-time ]
[ ! -f /tmp/forgebuild-branch ]
}
@test "update can mix source URL and task name" {
git init $BATS_TMPDIR/newrepo
echo "$BATS_TMPDIR/newrepo" > "$FORGEBUILDDIR"/branch.source
$FORGEBUILD -b $FORGEBUILDDIR "$GITREPO" "branch"
[ -f /tmp/forgebuild-host ]
[ -f /tmp/forgebuild-time ]
[ -f /tmp/forgebuild-branch ]
}
@test "support any default branch (not just master)" {
cd $GITREPO
# Move "master" to "default" branch