Merge pull request #10042 from nextcloud/fix-variable-not-replaced-in-behat-yml-when-default-value-was-used
Fix variable not replaced in "behat.yml" when default value was used
This commit is contained in:
commit
dd880d1319
|
@ -171,21 +171,19 @@ REPLACEMENT="profile: $ACCEPTANCE_TESTS_CONFIG_DIR"
|
||||||
FILE_CONTENTS=$(<$ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml)
|
FILE_CONTENTS=$(<$ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml)
|
||||||
echo "${FILE_CONTENTS//$ORIGINAL/$REPLACEMENT}" > $ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml
|
echo "${FILE_CONTENTS//$ORIGINAL/$REPLACEMENT}" > $ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml
|
||||||
|
|
||||||
if [ "$SELENIUM_SERVER" != "$DEFAULT_SELENIUM_SERVER" ]; then
|
# Set the Selenium server to be used by Mink. Although Mink sessions can be
|
||||||
# Set the Selenium server to be used by Mink. Although Mink sessions can be
|
# extended through BEHAT_PARAMS this would require adding here too each new
|
||||||
# extended through BEHAT_PARAMS this would require adding here too each new
|
# session added to "behat.yml", including those added in the acceptance
|
||||||
# session added to "behat.yml", including those added in the acceptance
|
# tests of apps. Instead, the default "behat.yml" configuration file is
|
||||||
# tests of apps. Instead, the default "behat.yml" configuration file is
|
# adjusted to replace the simulated "selenium.server" variable by its value
|
||||||
# adjusted to replace the simulated "selenium.server" variable by its value
|
# before the configuration file is parsed by Behat.
|
||||||
# before the configuration file is parsed by Behat.
|
ORIGINAL="wd_host: %selenium.server%"
|
||||||
ORIGINAL="wd_host: %selenium.server%"
|
REPLACEMENT="wd_host: http://$SELENIUM_SERVER/wd/hub"
|
||||||
REPLACEMENT="wd_host: http://$SELENIUM_SERVER/wd/hub"
|
# As the substitution does not involve regular expressions or multilines it
|
||||||
# As the substitution does not involve regular expressions or multilines it
|
# can be done just with Bash. Moreover, this does not require escaping the
|
||||||
# can be done just with Bash. Moreover, this does not require escaping the
|
# regular expression characters that may appear in the URL, like "/".
|
||||||
# regular expression characters that may appear in the URL, like "/".
|
FILE_CONTENTS=$(<$ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml)
|
||||||
FILE_CONTENTS=$(<$ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml)
|
echo "${FILE_CONTENTS//$ORIGINAL/$REPLACEMENT}" > $ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml
|
||||||
echo "${FILE_CONTENTS//$ORIGINAL/$REPLACEMENT}" > $ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml
|
|
||||||
fi
|
|
||||||
|
|
||||||
composer install
|
composer install
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue