sapling/eden/integration/nfs_test.py
Xavier Deguillard ac0a4eee2e test: add clone_nfs test
Summary:
For now, this simply clone a repo with NFS, and nothing else, more of the
protocol needs implementing to support reading directories, files, etc.

Reviewed By: kmancini

Differential Revision: D26266144

fbshipit-source-id: e379e12126162f41d8d166bb53652e1e501de2e9
2021-03-17 21:30:06 -07:00

29 lines
877 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.
# pyre-strict
from typing import Optional, Dict, List
from .lib import testcase
@testcase.eden_repo_test
class NfsTest(testcase.EdenRepoTest):
def populate_repo(self) -> None:
self.repo.write_file("hello", "hola\n")
self.repo.commit("Initial commit.")
def edenfs_logging_settings(self) -> Optional[Dict[str, str]]:
return {"eden.fs.nfs": "DBG7", "eden.strace": "DBG7"}
def edenfs_extra_config(self) -> Optional[Dict[str, List[str]]]:
return {"experimental": ["enable-nfs-server = true"]}
def test_clone(self) -> None:
clone_dir = self.make_temporary_directory()
self.eden.clone(self.repo.path, clone_dir, nfs=True)