mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
8884b46b3f
Summary: Move the integration tests from eden/fs/integration up one directory, to eden/integration. The main benefit is that this makes it easy to run just the edenfs unit tests by running "buck test eden/fs/...". These unit tests complete much more quickly than the full set of integration tests, providing a faster test suite to re-run repeatedly during development. The integration tests can be run with "buck test eden/integration/...", and the full set of tests can still be run with "buck test eden/..." Reviewed By: wez Differential Revision: D4490247 fbshipit-source-id: 5ceb5a19526f56e1cb926f352fa30ad2f1212c05
24 lines
814 B
Python
24 lines
814 B
Python
#!/usr/bin/env python3
|
|
#
|
|
# Copyright (c) 2016-present, Facebook, Inc.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the BSD-style license found in the
|
|
# LICENSE file in the root directory of this source tree. An additional grant
|
|
# of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
from .lib import edenclient, testcase
|
|
|
|
|
|
class HealthTest(testcase.EdenTestCase):
|
|
def test_is_healthy(self):
|
|
self.assertTrue(self.eden.is_healthy())
|
|
self.eden.shutdown()
|
|
self.assertFalse(self.eden.is_healthy())
|
|
|
|
def test_disconnected_daemon_is_not_healthy(self):
|
|
# Create a new edenfs instance that is never started, and make sure
|
|
# it is not healthy.
|
|
with edenclient.EdenFS() as client:
|
|
self.assertFalse(client.is_healthy())
|