-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unit test for replacing a file with a submodule
Summary: ## This stack See D55064943. ## This diff Adds a unit test for a specific edge case, where a submodule is added to the small repo (repo A) in the same path of a regular file. **Expected behaviour:** file is deleted in repo A's folder in the large repo and the new submodule is added as a directory containing its expansion. **Current behaviour:** This triggered a couple of bugs, which will be fixed in the next diffs: 1. We try to read the regular file as a submodule file, to get the git hash and get the previous submodule pointer. This crashes because the file doesn't contain a git hash. 2. We don't generate the deletion of the regular file in the large repo bonsai. This leads to failures in the derivation of fsnodes. This brings another important test: derive all data types in all tests to make sure we don't break anything in the large repo, so I'm adding a TODO for this. ## Notes - To add this test, I extended the helpers to allow passing more repos to be used a submodule deps in that test case. - I left some code commented that represents what the final unit test should look like once these issues are fixed, which will happen soon in the next few diffs. Reviewed By: mitrandir77 Differential Revision: D55068950 fbshipit-source-id: b4f2331852c7866894513186a919fc56e9900f3f
- Loading branch information
1 parent
98ff48b
commit 6ee04e1
Showing
2 changed files
with
148 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters