Skip to content

Commit

Permalink
Merge pull request #4 from PackagrIO/update_go_common
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Mar 16, 2022
2 parents 212c335 + fac1109 commit f72392f
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 14 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/golang/mock v1.4.4
github.com/k0kubun/pp v3.0.1+incompatible // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/packagrio/go-common v0.0.2
github.com/packagrio/go-common v0.0.5
github.com/seborama/govcr v4.5.0+incompatible // indirect
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.7.0
Expand Down
15 changes: 15 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/analogj/go-bitbucket v0.4.0/go.mod h1:MxqZJ1LIpr+9NqE3KloUc6eZYdSbfi0WP5aKc8Q5mDE=
github.com/analogj/go-util v0.0.0-20200905200945-3b93d31215ae/go.mod h1:lJQVqFKMV5/oDGYR2bra2OljcF3CvolAoyDRyOA4k4E=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/k0kubun/pp v3.0.1+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg=
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/packagrio/go-common v0.0.5 h1:kKXwg+Vm6rewn06X2Z4GcZrvfdglUcni68tUimquaG4=
github.com/packagrio/go-common v0.0.5/go.mod h1:FP3yg500eI/khJdj+AjnbhlHdpsbbyT85hquoxe/N28=
github.com/seborama/govcr v4.5.0+incompatible/go.mod h1:EgcISudCCYDLzbiAImJ8i7kk4+wTA44Kp+j4S0LhASI=
github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
gopkg.in/libgit2/git2go.v25 v25.1.0/go.mod h1:9J2SB7jVeRmLUFiUp5yqk2qAToco2ocSLkY/VOoxhkM=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
9 changes: 5 additions & 4 deletions pkg/engine/engine_golang_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import (
"github.com/packagrio/releasr/pkg/config"
"github.com/packagrio/releasr/pkg/engine"
releasrUtils "github.com/packagrio/releasr/pkg/utils"
mock_scm "github.com/packagrio/go-common/scm/mock"
mock_config "github.com/packagrio/releasr/pkg/config/mock"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"io/ioutil"
"path"
"github.com/packagrio/go-common/scm/mock"
"github.com/packagrio/releasr/pkg/config/mock"
"os"
"path"
"net/http"
"testing"
)

Expand All @@ -28,7 +29,7 @@ func TestEngineGolang_Create(t *testing.T) {
testConfig.Set(config.PACKAGR_SCM, "github")
testConfig.Set(config.PACKAGR_PACKAGE_TYPE, "golang")
pipelineData := new(pipeline.Data)
githubScm, err := scm.Create("github", pipelineData, testConfig, nil)
githubScm, err := scm.Create("github", pipelineData, testConfig, &http.Client{})
require.NoError(t, err)

//test
Expand Down
5 changes: 3 additions & 2 deletions pkg/engine/engine_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ import (
"path"
//"path/filepath"
mock_scm "github.com/packagrio/go-common/scm/mock"
"github.com/packagrio/releasr/pkg/config/mock"
mock_config "github.com/packagrio/releasr/pkg/config/mock"
"os"
"net/http"
"testing"
)

Expand All @@ -29,7 +30,7 @@ func TestEngineNode_Create(t *testing.T) {
testConfig.Set(config.PACKAGR_SCM, "github")
testConfig.Set(config.PACKAGR_PACKAGE_TYPE, "node")
pipelineData := new(pipeline.Data)
githubScm, err := scm.Create("github", pipelineData, testConfig, nil)
githubScm, err := scm.Create("github", pipelineData, testConfig, &http.Client{})
require.NoError(t, err)

//test
Expand Down
8 changes: 4 additions & 4 deletions pkg/engine/engine_python_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
releasrUtils "github.com/packagrio/releasr/pkg/utils"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
mock_scm "github.com/packagrio/go-common/scm/mock"
mock_config "github.com/packagrio/releasr/pkg/config/mock"
"io/ioutil"
"os"
"net/http"

//"path/filepath"
"github.com/packagrio/go-common/scm/mock"
"github.com/packagrio/releasr/pkg/config/mock"
"testing"
)

Expand All @@ -28,7 +28,7 @@ func TestEnginePython_Create(t *testing.T) {
testConfig.Set(config.PACKAGR_SCM, "github")
testConfig.Set(config.PACKAGR_PACKAGE_TYPE, "python")
pipelineData := new(pipeline.Data)
githubScm, err := scm.Create("github", pipelineData, testConfig, nil)
githubScm, err := scm.Create("github", pipelineData, testConfig, &http.Client{})
require.NoError(t, err)

//test
Expand Down
8 changes: 5 additions & 3 deletions pkg/engine/engine_ruby_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ import (
"github.com/stretchr/testify/suite"

//"path/filepath"
"github.com/packagrio/go-common/scm/mock"
"github.com/packagrio/releasr/pkg/config/mock"
mock_scm "github.com/packagrio/go-common/scm/mock"
mock_config "github.com/packagrio/releasr/pkg/config/mock"
"testing"
"net/http"

)

func TestEngineRuby_Create(t *testing.T) {
Expand All @@ -25,7 +27,7 @@ func TestEngineRuby_Create(t *testing.T) {
testConfig.Set(config.PACKAGR_SCM, "github")
testConfig.Set(config.PACKAGR_PACKAGE_TYPE, "ruby")
pipelineData := new(pipeline.Data)
githubScm, err := scm.Create("github", pipelineData, testConfig, nil)
githubScm, err := scm.Create("github", pipelineData, testConfig, &http.Client{})
require.NoError(t, err)

//test
Expand Down

0 comments on commit f72392f

Please sign in to comment.