Skip to content

Commit e1fd55d

Browse files
committed
fix test for check branches
shouldn't have made any branches, meant to only have the default branches Signed-off-by: Taylor Silva <dev@taydev.net>
1 parent ed38e7d commit e1fd55d

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

test/check_branches.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ it_returns_empty_array_when_no_new_branches() {
7474

7575
it_returns_none_when_no_branches_found() {
7676
local repo=$(init_repo)
77-
make_commit_to_branch $repo issue/hjkl >/dev/null
78-
make_commit_to_branch $repo feat/oiuy >/dev/null
79-
make_commit_to_branch $repo bug/876 >/dev/null
80-
make_commit_to_branch $repo refactor/ui >/dev/null
8177

8278
# only master and bogus branch exist, therefore no matching branches should be found
8379
check_uri_with_branch_filters $repo "issue/*" | jq -e '
@@ -91,3 +87,4 @@ run it_errors_if_branch_filters_and_branch_regex_are_set
9187
run it_uses_all_branch_filters
9288
run it_uses_branch_regex
9389
run it_returns_empty_array_when_no_new_branches
90+
run it_returns_none_when_no_branches_found

test/helpers.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ make_commit_to_file_on_branch() {
155155
local msg=${4-}
156156

157157
# ensure branch exists
158-
if ! git -C $repo rev-parse --verify $branch >/dev/null; then
158+
if ! git -C $repo rev-parse --verify $branch &>/dev/null; then
159159
git -C $repo branch $branch master
160160
fi
161161

@@ -195,7 +195,7 @@ make_commit_to_file_on_branch_with_path() {
195195
local msg=${5-}
196196

197197
# ensure branch exists
198-
if ! git -C $repo rev-parse --verify $branch >/dev/null; then
198+
if ! git -C $repo rev-parse --verify $branch &>/dev/null; then
199199
git -C $repo branch $branch master
200200
fi
201201

@@ -258,7 +258,7 @@ merge_branch() {
258258
}
259259

260260
delete_public_key() {
261-
if gpg -k ${fingerprint} > /dev/null; then
261+
if gpg -k ${fingerprint} &> /dev/null; then
262262
gpg --batch --yes --delete-keys ${fingerprint}
263263
fi
264264
}

0 commit comments

Comments
 (0)