Skip to content

Commit

Permalink
Set odo to use staging registry in CommonBeforeEach (#5057)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharmit committed Sep 14, 2021
1 parent 1ffc885 commit db0d3dd
Show file tree
Hide file tree
Showing 21 changed files with 1 addition and 25 deletions.
1 change: 0 additions & 1 deletion tests/e2escenarios/e2e_devfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ var _ = Describe("odo devfile supported tests", func() {
projectDirPath = commonVar.Context + projectDir
helper.MakeDir(projectDirPath)
helper.Chdir(projectDirPath)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 1 addition & 0 deletions tests/helper/helper_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ func CommonBeforeEach() CommonVar {
cfg, _ := preference.New()
err := cfg.SetConfiguration(preference.ConsentTelemetrySetting, "false")
Expect(err).To(BeNil())
SetDefaultDevfileRegistryAsStaging()
return commonVar
}

Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ var _ = Describe("odo devfile app command tests", func() {
var _ = BeforeEach(func() {
commonVar = helper.CommonBeforeEach()
namespace = commonVar.Project
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ var _ = Describe("odo devfile catalog command tests", func() {
// odo catalog list components.
// TODO: Investigate this more.
helper.Cmd("odo", "preference", "set", "registrycachetime", "0").ShouldPass()
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ var _ = Describe("odo devfile config command tests", func() {
var _ = BeforeEach(func() {
commonVar = helper.CommonBeforeEach()
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ var _ = Describe("odo devfile create command tests", func() {
cmpName = helper.RandString(6)
commonVar = helper.CommonBeforeEach()
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ var _ = Describe("odo devfile debug command tests", func() {
var _ = BeforeEach(func() {
commonVar = helper.CommonBeforeEach()
componentName = helper.RandString(6)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ var _ = Describe("odo devfile delete command tests", func() {
commonVar = helper.CommonBeforeEach()
componentName = helper.RandString(6)
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ var _ = Describe("odo devfile describe command tests", func() {
}

commonVar = helper.CommonBeforeEach()
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ var _ = Describe("odo devfile env command tests", func() {
var _ = BeforeEach(func() {
commonVar = helper.CommonBeforeEach()
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ var _ = Describe("odo devfile exec command tests", func() {
commonVar = helper.CommonBeforeEach()
cmpName = helper.RandString(6)
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ var _ = Describe("odo list with devfile", func() {
commonVar = helper.CommonBeforeEach()
cmpName = helper.RandString(6)
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ var _ = Describe("odo devfile log command tests", func() {
var _ = BeforeEach(func() {
commonVar = helper.CommonBeforeEach()
cmpName = helper.RandString(6)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ var _ = Describe("odo devfile push command tests", func() {
commonVar = helper.CommonBeforeEach()
cmpName = helper.RandString(6)
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ var _ = Describe("odo devfile registry command tests", func() {
var _ = BeforeEach(func() {
commonVar = helper.CommonBeforeEach()
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ var _ = Describe("odo devfile status command tests", func() {
namespace = commonVar.Project
context = commonVar.Context
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// Clean up after the test
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ var _ = Describe("odo devfile storage command tests", func() {
var _ = BeforeEach(func() {
commonVar = helper.CommonBeforeEach()
cmpName = helper.RandString(6)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_test_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ var _ = Describe("odo devfile test command tests", func() {
var _ = BeforeEach(func() {
commonVar = helper.CommonBeforeEach()
cmpName = helper.RandString(6)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ var _ = Describe("odo devfile url command tests", func() {
commonVar = helper.CommonBeforeEach()
componentName = helper.RandString(6)
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/devfile/cmd_devfile_watch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ var _ = Describe("odo devfile watch command tests", func() {
commonVar = helper.CommonBeforeEach()
cmpName = helper.RandString(6)
helper.Chdir(commonVar.Context)
helper.SetDefaultDevfileRegistryAsStaging()
})

// This is run after every Spec (It)
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/devfile/debug/debug_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ package debug
import (
"testing"

. "github.com/onsi/ginkgo"
"github.com/openshift/odo/tests/helper"
)

func TestDebug(t *testing.T) {
helper.RunTestSpecs(t, "Devfile Debug Suite")
}

// Use JustBeforeEach to use the preference file set into BeforeEach
var _ = JustBeforeEach(func() {
helper.SetDefaultDevfileRegistryAsStaging()
})

0 comments on commit db0d3dd

Please sign in to comment.