From 567dfda748c8fcda2e37b066dd64af2cd21c878b Mon Sep 17 00:00:00 2001 From: Chris Gavin Date: Tue, 25 Aug 2020 13:33:13 +0100 Subject: [PATCH] Fix an issue with the tests where they update a file every time they are run. --- internal/push/push.go | 5 +++++ internal/push/push_test/action-cache-initial/git/config | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/push/push.go b/internal/push/push.go index 555f4cb..62a2893 100644 --- a/internal/push/push.go +++ b/internal/push/push.go @@ -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 } diff --git a/internal/push/push_test/action-cache-initial/git/config b/internal/push/push_test/action-cache-initial/git/config index afde36a..07d359d 100644 --- a/internal/push/push_test/action-cache-initial/git/config +++ b/internal/push/push_test/action-cache-initial/git/config @@ -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/*