mirror of https://github.com/dapr/cli.git
Merge pull request #759 from tanvigour/tanvi/feature-branch
filter instances that don't start sidecar from dapr list
This commit is contained in:
commit
19131133e9
|
|
@ -180,7 +180,10 @@ func List() ([]ListOutput, error) {
|
|||
listRow.Command = utils.TruncateString(run.appCmd, 20)
|
||||
}
|
||||
|
||||
list = append(list, listRow)
|
||||
// filter only dashboard instance
|
||||
if listRow.AppID != "" {
|
||||
list = append(list, listRow)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,6 +113,13 @@ func TestNegativeScenarios(t *testing.T) {
|
|||
require.Contains(t, output, "WARNING: "+path+" does not exist", "expected output to contain message")
|
||||
require.Contains(t, output, "Dapr has been removed successfully")
|
||||
})
|
||||
|
||||
t.Run("filter dahsboard instance from list", func(t *testing.T) {
|
||||
spawn.Command(daprPath, "dashboard", "-p", "5555")
|
||||
cmd, err := spawn.Command(daprPath, "list")
|
||||
require.NoError(t, err, "expected no error status on list without install")
|
||||
require.Equal(t, "No Dapr instances found.\n", cmd)
|
||||
})
|
||||
}
|
||||
|
||||
func getDaprPath() string {
|
||||
|
|
|
|||
Loading…
Reference in New Issue