diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 574e435..af3af3d 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -10,7 +10,6 @@ import ( ) func TestConfiguration_init_ShouldCorrectlyInitializeConfiguration(t *testing.T) { - t.Parallel() //setup defer utils.UnsetEnv("PACKAGR_")() @@ -40,6 +39,7 @@ func TestConfiguration_init_EnvVariablesShouldLoadProperly(t *testing.T) { func TestConfiguration_ReadConfig(t *testing.T) { //setup + defer utils.UnsetEnv("PACKAGR_")() testConfig, _ := config.Create() testConfig.SetDefault(config.PACKAGR_PACKAGE_TYPE, "generic") testConfig.SetDefault(config.PACKAGR_SCM, "default") diff --git a/pkg/engine/engine_chef_test.go b/pkg/engine/engine_chef_test.go index 1d3e823..aa298f8 100644 --- a/pkg/engine/engine_chef_test.go +++ b/pkg/engine/engine_chef_test.go @@ -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" @@ -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 diff --git a/pkg/engine/engine_golang_test.go b/pkg/engine/engine_golang_test.go index 715b481..ad697bc 100644 --- a/pkg/engine/engine_golang_test.go +++ b/pkg/engine/engine_golang_test.go @@ -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" @@ -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 diff --git a/pkg/engine/engine_node_test.go b/pkg/engine/engine_node_test.go index 78073fa..89d337e 100644 --- a/pkg/engine/engine_node_test.go +++ b/pkg/engine/engine_node_test.go @@ -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" @@ -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 diff --git a/pkg/engine/engine_python_test.go b/pkg/engine/engine_python_test.go index 2637434..cbe285a 100644 --- a/pkg/engine/engine_python_test.go +++ b/pkg/engine/engine_python_test.go @@ -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" @@ -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 diff --git a/pkg/engine/engine_ruby_test.go b/pkg/engine/engine_ruby_test.go index 2dbabc0..1cc18f6 100644 --- a/pkg/engine/engine_ruby_test.go +++ b/pkg/engine/engine_ruby_test.go @@ -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" @@ -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 diff --git a/pkg/pipeline.go b/pkg/pipeline.go index 28fab46..427a403 100644 --- a/pkg/pipeline.go +++ b/pkg/pipeline.go @@ -9,6 +9,7 @@ import ( "github.com/packagrio/go-common/pipeline" "github.com/packagrio/go-common/scm" "log" + "net/http" "os" "path" "path/filepath" @@ -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)