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

backend: fix authenticator tests #296

Merged
merged 2 commits into from
May 31, 2023
Merged

Conversation

djshow832
Copy link
Collaborator

@djshow832 djshow832 commented May 31, 2023

What problem does this PR solve?

Issue Number: close #295

Problem Summary:

  • The result of the function getCfgCombinations is wrong: the slice of append(o, cfg) is reused and thus overwrites previous slices, so the test doesn't cover all the cases.
  • The cfgOverriders are wrong. E.g. cfg.clientConfig.capability = defaultTestClientCapability & ^pnet.ClientPSMultiResults overwrites other capabilities. It should be cfg.clientConfig.capability &= ^pnet.ClientPSMultiResults to only change the current capability. It also doesn't cover all the cases.

What is changed and how it works:

  • Fix getCfgCombinations.
  • Fix cfgOverriders.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change
  • Has tiproxyctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@djshow832 djshow832 requested a review from xhebox May 31, 2023 03:11
@djshow832 djshow832 changed the title fix auth test backend: fix authenticator tests May 31, 2023
@djshow832 djshow832 merged commit 98555ee into pingcap:main May 31, 2023
@djshow832 djshow832 deleted the fix_auth_test branch May 31, 2023 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some bugs in testcases in authenticator
2 participants