Skip to content

Commit

Permalink
fixes for scm Init.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Mar 16, 2022
1 parent c4dae4d commit b662f14
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
9 changes: 5 additions & 4 deletions pkg/engine/engine_golang_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ import (
"github.com/golang/mock/gomock"
"github.com/packagrio/go-common/pipeline"
"github.com/packagrio/go-common/scm"
"github.com/packagrio/go-common/scm/mock"
"github.com/packagrio/releasr/pkg/config"
"github.com/packagrio/releasr/pkg/config/mock"
"github.com/packagrio/releasr/pkg/engine"
releasrUtils "github.com/packagrio/releasr/pkg/utils"
"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
3 changes: 2 additions & 1 deletion pkg/engine/engine_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
mock_scm "github.com/packagrio/go-common/scm/mock"
"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
6 changes: 2 additions & 4 deletions pkg/engine/engine_python_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ import (
"github.com/stretchr/testify/suite"
"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 +26,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
4 changes: 3 additions & 1 deletion pkg/engine/engine_ruby_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
"github.com/packagrio/go-common/scm/mock"
"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 b662f14

Please sign in to comment.