Skip to content

[test] Integration test coverage #17132

Closed

Description

Activity

  1. codelipenghui commented on Aug 22, 2022

    @codelipenghui
    ContributorAuthor

    @nodece Is handling the integration test of security

  2. self-assigned this
    on Aug 22, 2022
  3. andrasbeni commented on Sep 20, 2022

    @andrasbeni
    Contributor

    @codelipenghui , can you please let me know what tests you would like to see for the admin CLI? As I can see, runAdminCommandOnAnyBroker does use the admin cli and is used extensively by integrations tests. And there are some more usages through the constant ADMIN_SCRIPT. So it's not a dedicated test, but I think it already has some coverage.

  4. codelipenghui commented on Sep 28, 2022

    @codelipenghui
    ContributorAuthor

    @andrasbeni Most of the admin CLI integration tests are under tests/integration/cli and yes we already have some coverage for this part. I think we should also consider the improve the coverage for this part to avoid someone changing the output format or introducing new incompatible options. But it's not a very strong opinion, we need to maintain so many test codes in the future. WDYT?

  5. andrasbeni commented on Sep 29, 2022

    @andrasbeni
    Contributor

    @codelipenghui , I believe integration tests are too expensive to do a full validation of output and command line parameters. Having taken a quick look at admin command implementations and PulsarAdminToolTest, it looks to me that admin commands are designed to be easily unit tested: the PulsarAdmin can be mocked by setting a Supplier and CaptureStdOut makes their output verifiable. So, in my opinion, we would be much better off writing unit tests for all these.

  6. codelipenghui commented on Sep 29, 2022

    @codelipenghui
    ContributorAuthor

    @andrasbeni Sound good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions