Revert "Feature: Create a new branch, if the given branch name doesn't exist yet"

This commit is contained in:
Stefan Zweifel
2021-02-23 21:14:19 +01:00
committed by GitHub
parent 3870982ac5
commit 75625df4f3
2 changed files with 3 additions and 44 deletions

View File

@@ -331,25 +331,3 @@ git_auto_commit() {
assert_line "::debug::git-fetch has not been executed"
}
@test "If INPUT_BRANCH is set and the branch does not exist it creates one" {
INPUT_BRANCH="new-branch"
run git branch
refute_line "new-branch"
touch "${FAKE_LOCAL_REPOSITORY}"/new-file-{1,2,3}.txt
run git_auto_commit
assert_success
assert_line "INPUT_BRANCH value: new-branch"
assert_line --partial "::debug::Push commit to remote branch new-branch"
# Assert that branch "new-branch" was updated on remote
current_sha="$(git rev-parse --verify --short new-branch)"
remote_sha="$(git rev-parse --verify --short origin/new-branch)"
assert_equal $current_sha $remote_sha
}