Skip to content

Commit

Permalink
Get DEVFILE_REGISTRY value for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Mar 31, 2023
1 parent dfb36dd commit c457b70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/helper/helper_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,5 +378,9 @@ func GetDevfileRegistryURL() string {
if proxy != "" {
registryURL = "http://" + proxy
}
customReg := os.Getenv("DEVFILE_REGISTRY")
if customReg != "" {
registryURL = customReg
}
return registryURL
}
4 changes: 4 additions & 0 deletions tests/integration/cmd_devfile_registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ var _ = Describe("odo devfile registry command tests", func() {
if proxy != "" {
addRegistryURL = "http://" + proxy
}
customDevfileRegistry := os.Getenv("DEVFILE_REGISTRY")
if customDevfileRegistry != "" {
addRegistryURL = customDevfileRegistry
}

It("Should list all default registries", func() {
output := helper.Cmd("odo", "preference", "view").ShouldPass().Out()
Expand Down

0 comments on commit c457b70

Please sign in to comment.