From c3601ef336f3aeb9bcfdbe56e33d7dc29fe2bf4c Mon Sep 17 00:00:00 2001 From: Jon Hadfield Date: Sun, 21 Aug 2022 22:02:02 +0100 Subject: [PATCH] update githosts-utils dependency to enable pagination of gitlab group projects. --- go.mod | 2 +- go.sum | 4 ++-- main_test.go | 13 ++++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 3f9b5df..be764f7 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/carlescere/scheduler v0.0.0-20170109141437-ee74d2f83d82 - github.com/jonhadfield/githosts-utils v0.0.0-20220818193144-0075915532b7 + github.com/jonhadfield/githosts-utils v0.0.0-20220821205933-8d4069df37b4 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.0 ) diff --git a/go.sum b/go.sum index 8caa625..e6ca5ef 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/jonhadfield/githosts-utils v0.0.0-20220818193144-0075915532b7 h1:4p8CKbpH6C/VVN2/Kqh6Fs2EQiNo7Wta7caSS5a1wo8= -github.com/jonhadfield/githosts-utils v0.0.0-20220818193144-0075915532b7/go.mod h1:v6wgdz/EhWvXy67qhMgXeCuiwAMfUt86nx3xGZQ5Yj8= +github.com/jonhadfield/githosts-utils v0.0.0-20220821205933-8d4069df37b4 h1:1W5s69GAzCv65S8RBYUQmpgc1R98C1mKCbcgVjYGzHY= +github.com/jonhadfield/githosts-utils v0.0.0-20220821205933-8d4069df37b4/go.mod h1:v6wgdz/EhWvXy67qhMgXeCuiwAMfUt86nx3xGZQ5Yj8= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= diff --git a/main_test.go b/main_test.go index 9fdce97..1565b4e 100644 --- a/main_test.go +++ b/main_test.go @@ -13,7 +13,7 @@ import ( ) var sobaEnvVarKeys = []string{ - "GIT_BACKUP_DIR", "GITHUB_TOKEN", "GITHUB_BACKUPS", "GITLAB_TOKEN", "GITLAB_BACKUPS", + "GIT_BACKUP_DIR", "GITHUB_TOKEN", "GITHUB_BACKUPS", "GITLAB_TOKEN", "GITLAB_BACKUPS", "GITLAB_APIURL", "BITBUCKET_USER", "BITBUCKET_KEY", "BITBUCKET_SECRET", "BITBUCKET_BACKUPS", } @@ -163,6 +163,17 @@ func TestPublicGitLabRepositoryBackup(t *testing.T) { restoreEnvironmentVariables(envBackup) } +func TestPublicGitLabRepositoryBackup2(t *testing.T) { + if os.Getenv("GITLAB_TOKEN") == "" { + t.Skip("Skipping GitLab test as GITLAB_TOKEN is missing") + } + resetGlobals() + envBackup := backupEnvironmentVariables() + unsetEnvVars([]string{"GIT_BACKUP_DIR", "GITLAB_TOKEN"}) + require.NoError(t, run()) + restoreEnvironmentVariables(envBackup) +} + func TestPublicBitBucketRepositoryBackup(t *testing.T) { if os.Getenv("BITBUCKET_USER") == "" { t.Skip("Skipping BitBucket test as BITBUCKET_USER is missing")