Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

mock: enable the mock package only in unit tests (#838)#842

Closed
ti-srebot wants to merge 1 commit into
pingcap:release-4.0from
ti-srebot:release-4.0-969b4204aefd
Closed

mock: enable the mock package only in unit tests (#838)#842
ti-srebot wants to merge 1 commit into
pingcap:release-4.0from
ti-srebot:release-4.0-969b4204aefd

Conversation

@ti-srebot
Copy link
Copy Markdown
Contributor

@ti-srebot ti-srebot commented Mar 10, 2021

cherry-pick #838 to release-4.0
You can switch your code base to this Pull Request by using git-extras:

# In br repo:
git pr https://github.com/pingcap/br/pull/842

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/br.git pr/842:release-4.0-969b4204aefd

What problem does this PR solve?

Close #837. Allows TiDB to depend on BR without pulling in Lightning's dependencies yet.

What is changed and how it works?

Make the mock package (currently depending on backend package which in turn pulls in pebble and the whole tree) require the build tag br_test. The tag is only active in unit tests.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
    • The mock package is no longer allowed outside of unit tests.

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release Note

  • No release note

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@kennytm
Copy link
Copy Markdown
Collaborator

kennytm commented Mar 10, 2021

Seems not necessary yet since #788 is still not merged. WDYT @overvenus should this PR be directly combined into #788.

@overvenus
Copy link
Copy Markdown
Member

Seems not necessary yet since #788 is still not merged. WDYT @overvenus should this PR be directly combined into #788.

Yes, could you pick the commit to #788 @kennytm ?

@kennytm kennytm closed this Mar 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants