mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
ed58335598
Summary: This moves all of the test library code into a lib/ subdirectory, just to help distinguish tests from utility code. This also changes the test so that we no longer pack the eden CLI and daemon binaries into the python archives. This results in very large archives when building in dbg and opt modes, and isn't really necessary. Instead edenclient.py simply finds the CLI and daemon binaries relative to the test binary. We pass in an EDENFS_SUFFIX variable to tell it which flavor of the daemon to use. Additionally, this changes the tests to run with python 3. Reviewed By: bolinfest Differential Revision: D3449013 fbshipit-source-id: 82533137090325766a52cd067aa97dd8391ae088
24 lines
783 B
Python
24 lines
783 B
Python
#!/usr/bin/env python3
|
|
#
|
|
# Copyright (c) 2016, 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_connected_client_is_healthy(self):
|
|
client = edenclient.EdenClient(self)
|
|
client.daemon_cmd()
|
|
self.assertTrue(client.is_healthy())
|
|
client.shutdown_cmd()
|
|
self.assertFalse(client.is_healthy())
|
|
|
|
def test_disconnected_client_is_not_healthy(self):
|
|
client = edenclient.EdenClient(self)
|
|
self.assertFalse(client.is_healthy())
|