mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
4779ddcd79
Summary: Some tests would clone using FUSE, which would thus not tests NFS. Let's make the EdenFS class aware of NFS and force cloning with --nfs in that case. Reviewed By: kmancini Differential Revision: D28491492 fbshipit-source-id: ce7d609f187c21937626106a16a1f352ba88ceca
25 lines
767 B
Python
25 lines
767 B
Python
#!/usr/bin/env python3
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2.
|
|
|
|
import pathlib
|
|
|
|
from .lib import testcase
|
|
|
|
|
|
@testcase.eden_repo_test
|
|
class EdenClientTest(testcase.EdenRepoTest):
|
|
def populate_repo(self) -> None:
|
|
self.repo.write_file("hello", "hola\n")
|
|
self.repo.commit("Initial commit.")
|
|
|
|
def test_client_dir_for_mount(self) -> None:
|
|
clone_path = pathlib.Path(self.tmp_dir, "test_checkout")
|
|
self.eden.clone(self.repo.path, str(clone_path))
|
|
self.assertEqual(
|
|
self.eden.client_dir_for_mount(clone_path),
|
|
pathlib.Path(self.eden_dir, "clients", "test_checkout"),
|
|
)
|