From 4511673e05aa4b6b961631265fb97f4b5d769d4a Mon Sep 17 00:00:00 2001 From: Kevin Pallikunnel Date: Wed, 9 Nov 2022 18:15:36 -0600 Subject: [PATCH] fix: Raise Error for long TEST_DIR I added an if statment after we define our test dir path to check if it is larger than 12 characters because otherwise it was throwing an error --- contrib/pyln-testing/pyln/testing/fixtures.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/pyln-testing/pyln/testing/fixtures.py b/contrib/pyln-testing/pyln/testing/fixtures.py index 795b67ecf246..f9143aa469f5 100644 --- a/contrib/pyln-testing/pyln/testing/fixtures.py +++ b/contrib/pyln-testing/pyln/testing/fixtures.py @@ -25,6 +25,8 @@ @pytest.fixture(scope="session") def test_base_dir(): d = os.getenv("TEST_DIR", "/tmp") + if len(d) > 12: + raise ValueError("TEST_DIR length is too long please create one with less than x characters") directory = tempfile.mkdtemp(prefix='ltests-', dir=d) print("Running tests in {}".format(directory))