From 490d7ddfe0710ffe7447e4ab2c6ad511c5a9a99c Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Thu, 26 Sep 2024 23:52:48 +0200 Subject: [PATCH] TASK: Cleanup bash script --- Tests/IntegrationTests/e2e.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Tests/IntegrationTests/e2e.sh b/Tests/IntegrationTests/e2e.sh index d3b5466ae1..79ba2d41ca 100755 --- a/Tests/IntegrationTests/e2e.sh +++ b/Tests/IntegrationTests/e2e.sh @@ -9,7 +9,7 @@ parse_arguments() { while [[ $# -gt 0 ]]; do case "$1" in -h|--help) - usage + print_usage_information exit 0 ;; -s|--saucelabs) @@ -21,7 +21,7 @@ parse_arguments() { ;; *) echo "Unknown option: $1" - usage + print_usage_information exit 1 ;; esac @@ -29,15 +29,14 @@ parse_arguments() { done } -# Function to print usage information -usage() { +print_usage_information() { cat < /dev/null; then echo "saucectl is not installed. Installing saucectl..." @@ -75,7 +73,7 @@ function check_saucectl_installed { fi } -# get dimension from fixture +# parse dimension from fixture file name function get_dimension() { dimension=$(basename "$1") echo "$dimension" @@ -88,7 +86,6 @@ function initialize_neos_site() { ln -s "../${fixture}SitePackage" DistributionPackages/Neos.TestSite - # TODO: optimize this composer reinstall neos/test-nodetypes composer reinstall neos/test-site # make sure neos is installed even if patching led to the removal (bug) @@ -137,12 +134,10 @@ function run_tests() { mv DummyDistributionPackages DistributionPackages } -# Parse arguments parse_arguments "$@" # check if incoming parameters are correct check_testcafe_browser check_saucelabs_setup -# Run the tests run_tests