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

pdctl: add operator subcommand tests for pd-ctl #1381

Merged
merged 1 commit into from
Dec 19, 2018

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Dec 13, 2018

What problem does this PR solve?

Part of #1328.

What is changed and how it works?

This PR adds some tests for operator subcommand in pd-ctl.

Check List

Tests

  • Unit test
  • Integration test

@rleungx rleungx changed the title add operator subcommand tests for pd-ctl pdctl: add operator subcommand tests for pd-ctl Dec 13, 2018
@rleungx rleungx mentioned this pull request Dec 13, 2018
14 tasks
args = []string{"-u", pdAddr, "operator", "show"}
_, output, err = executeCommandC(cmd, args...)
c.Assert(err, IsNil)
c.Assert(strings.Contains(string(output), "split region with policy APPROXIMATE"), IsTrue)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test processes are all the same. I think you can make it table-driven:
cmds := []struct{args []string, outputPattern string} {...}

Signed-off-by: rleungx <rleungx@gmail.com>
@rleungx rleungx merged commit c2e8d29 into tikv:master Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants