Skip to content

Commit

Permalink
fixing scm config.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Mar 17, 2022
1 parent a203137 commit c66d762
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion pkg/engine/engine_chef_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"io/ioutil"
"net/http"
"path"
//"path/filepath"
"github.com/packagrio/bumpr/pkg/config/mock"
Expand All @@ -30,7 +31,7 @@ func TestEngineChef_Create(t *testing.T) {
testConfig.Set(config.PACKAGR_SCM, "github")
testConfig.Set(config.PACKAGR_PACKAGE_TYPE, "chef")
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_golang_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"io/ioutil"
"net/http"
"path"
//"path/filepath"
"github.com/packagrio/bumpr/pkg/config/mock"
Expand All @@ -30,7 +31,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 @@ -14,6 +14,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"io/ioutil"
"net/http"
"path"
//"path/filepath"
"github.com/packagrio/bumpr/pkg/config/mock"
Expand All @@ -30,7 +31,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
3 changes: 2 additions & 1 deletion pkg/engine/engine_python_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"io/ioutil"
"net/http"
"path"
//"path/filepath"
"github.com/packagrio/bumpr/pkg/config/mock"
Expand All @@ -30,7 +31,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
3 changes: 2 additions & 1 deletion pkg/engine/engine_ruby_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"io/ioutil"
"net/http"
"path"
//"path/filepath"
"github.com/packagrio/bumpr/pkg/config/mock"
Expand All @@ -30,7 +31,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
3 changes: 2 additions & 1 deletion pkg/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/packagrio/go-common/pipeline"
"github.com/packagrio/go-common/scm"
"log"
"net/http"
"os"
"path"
"path/filepath"
Expand Down Expand Up @@ -36,7 +37,7 @@ func (p *Pipeline) Start(configData config.Interface) error {
return err
}

sourceScm, err := scm.Create(p.Config.GetString(config.PACKAGR_SCM), p.Data, p.Config, nil)
sourceScm, err := scm.Create(p.Config.GetString(config.PACKAGR_SCM), p.Data, p.Config, &http.Client{})
if err != nil {
fmt.Printf("FATAL: %+v\n", err)
os.Exit(1)
Expand Down

0 comments on commit c66d762

Please sign in to comment.