From 8362b937345050e943d2171e621ffe0c547fe551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 20 Oct 2023 00:18:08 +0200 Subject: [PATCH] config: use filenames that end in .py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are Python files, changing their file extension is a bad idea. Signed-off-by: Jakub SokoĊ‚owski --- test/e2e/ci/Jenkinsfile | 2 +- test/e2e/configs/__init__.py | 50 +++++++++---------- .../configs/{_local.py.ci => _local.ci.py} | 0 .../{_local.py.default => _local.default.py} | 0 4 files changed, 26 insertions(+), 26 deletions(-) rename test/e2e/configs/{_local.py.ci => _local.ci.py} (100%) rename test/e2e/configs/{_local.py.default => _local.default.py} (100%) diff --git a/test/e2e/ci/Jenkinsfile b/test/e2e/ci/Jenkinsfile index 7335df934a..c4514b13f6 100644 --- a/test/e2e/ci/Jenkinsfile +++ b/test/e2e/ci/Jenkinsfile @@ -132,7 +132,7 @@ pipeline { if (params.TEST_SCOPE != "") { cmd = cmd + " -m ${params.TEST_SCOPE}" } - sh "cp -f ./configs/_local.py.ci ./configs/_local.py" + dir ('configs') { sh 'ln -s _local.ci.py _local.py' } withCredentials([ usernamePassword( credentialsId: 'test-rail-api-devops', diff --git a/test/e2e/configs/__init__.py b/test/e2e/configs/__init__.py index 633c4fd710..79ebe71721 100644 --- a/test/e2e/configs/__init__.py +++ b/test/e2e/configs/__init__.py @@ -1,25 +1,25 @@ -import logging - -from scripts.utils.system_path import SystemPath -from . import testpath, timeouts, testrail, squish, system - -_logger = logging.getLogger(__name__) - -try: - from ._local import * -except ImportError: - exit( - 'Config file: "_local.py" not found in "./configs".\n' - 'Please use template "_.local.py.default" to create file or execute command: \n' - rf'cp {testpath.ROOT}/configs/_local.py.default {testpath.ROOT}/configs/_local.py' - ) - -if APP_DIR is None: - exit('Please add "APP_DIR" in ./configs/_local.py') -if system.IS_WIN and 'bin' not in APP_DIR: - exit('Please use launcher from "bin" folder in "APP_DIR"') -APP_DIR = SystemPath(APP_DIR) - -# Application will be stuck in test execution if set to False (Mac only) -# We need to investigate more time on it. -ATTACH_MODE = True +import logging + +from scripts.utils.system_path import SystemPath +from . import testpath, timeouts, testrail, squish, system + +_logger = logging.getLogger(__name__) + +try: + from ._local import * +except ImportError: + exit( + 'Config file: "_local.py" not found in "./configs".\n' + 'Please use template "_.local.default.py" to create file or execute command: \n' + rf'cp {testpath.ROOT}/configs/_local.default.py {testpath.ROOT}/configs/_local.py' + ) + +if APP_DIR is None: + exit('Please add "APP_DIR" in ./configs/_local.py') +if system.IS_WIN and 'bin' not in APP_DIR: + exit('Please use launcher from "bin" folder in "APP_DIR"') +APP_DIR = SystemPath(APP_DIR) + +# Application will be stuck in test execution if set to False (Mac only) +# We need to investigate more time on it. +ATTACH_MODE = True diff --git a/test/e2e/configs/_local.py.ci b/test/e2e/configs/_local.ci.py similarity index 100% rename from test/e2e/configs/_local.py.ci rename to test/e2e/configs/_local.ci.py diff --git a/test/e2e/configs/_local.py.default b/test/e2e/configs/_local.default.py similarity index 100% rename from test/e2e/configs/_local.py.default rename to test/e2e/configs/_local.default.py