Skip to content

Commit

Permalink
update githosts-utils dependency to enable pagination of gitlab group…
Browse files Browse the repository at this point in the history
… projects.
  • Loading branch information
jonhadfield committed Aug 21, 2022
1 parent dc0a38b commit c3601ef
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
13 changes: 12 additions & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}

Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit c3601ef

Please sign in to comment.