glassfish
  1. glassfish
  2. GLASSFISH-14195

list-components behavior different between 2.1 and 3.1 when passing an invalid type

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_b27
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      14,195

      Description

      There are some negative admin CLI tests (SE) that attempt to pass invalid types
      to the list-components command using the --type parameter. The docs (man page
      and online doc) state that valid types are: application, appclient, connector,
      ejb, jruby, web and webservice, or no type in which case all types are returned.
      In 3.1 if you pass an invalid type, the command still succeeds and exits with a
      value of 0. In 2.1, I assume based on the tests, the command fails and exits
      with an exit status of 1.

      As an example in 3.1:
      % ./asadmin list-components --type foo
      Nothing to list.

      Command list-components executed successfully.

      To be fair the doc does not state that an error should be propagated to the user
      if the type is not valid. I can certainly see both views as valid. Left as a
      decision to the dev/QA team.

        Activity

        Hide
        Hong Zhang added a comment -

        Produce the same error output for invalid type option to keep backward
        compatibility with v2.

        Show
        Hong Zhang added a comment - Produce the same error output for invalid type option to keep backward compatibility with v2.

          People

          • Assignee:
            Hong Zhang
            Reporter:
            Ryan O'Connell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: