Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

having no components in an app shouldn't be an error #1919

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/odo/cli/application/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

"github.com/openshift/odo/pkg/application"
"github.com/openshift/odo/pkg/component"
"github.com/openshift/odo/pkg/log"
"github.com/openshift/odo/pkg/odo/cli/project"
"github.com/openshift/odo/pkg/odo/genericclioptions"
"github.com/openshift/odo/pkg/odo/util"
Expand Down Expand Up @@ -82,7 +81,7 @@ func (o *DescribeOptions) Run() (err error) {
serviceList, _ := service.ListWithDetailedStatus(o.Client, o.appName)

if len(componentList.Items) == 0 && len(serviceList) == 0 {
log.Errorf("Application %s has no components or services deployed.", o.appName)
fmt.Printf("Application %s has no components or services deployed.", o.appName)
} else {
fmt.Printf("Application Name: %s has %v component(s) and %v service(s):\n--------------------------------------\n",
o.appName, len(componentList.Items), len(serviceList))
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/cmd_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ var _ = Describe("odoCmdApp", func() {

appDelete := helper.CmdShouldFail("odo", "app", "delete", "test", "--project", project, "-f")
Expect(appDelete).To(ContainSubstring("test app does not exists"))
helper.CmdShouldPass("odo", "app", "describe", "test", "--project", project)
// Uncomment once https://github.com/openshift/odo/issues/1803 is fixed
// Expect(appDescribe).To(ContainSubstring("Application test has no components or services deployed."))
appDescribe := helper.CmdShouldPass("odo", "app", "describe", "test", "--project", project)
Expect(appDescribe).To(ContainSubstring("Application test has no components or services deployed."))
})
})

Expand Down