Skip to content

Fix an issue with the tests where they update a file every time they are run. #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ func (pushService *pushService) pushGit(repository *github.Repository, initialPu
return errors.Wrap(err, "Error pushing Action to GitHub Enterprise Server.")
}
}

err = gitRepository.DeleteRemote(remoteName)
if err != nil {
return errors.Wrap(err, "Error removing repository remote.")
}
return nil
}

Expand Down
3 changes: 0 additions & 3 deletions internal/push/push_test/action-cache-initial/git/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@
repositoryformatversion = 0
filemode = true
bare = true
[remote "enterprise"]
url = /tmp/codeql-action-sync-tests128816160/target
fetch = +refs/heads/*:refs/remotes/enterprise/*