aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/acceptance/features/core/NextcloudTestServerContext.php21
-rwxr-xr-xbuild/acceptance/run-local.sh16
2 files changed, 8 insertions, 29 deletions
diff --git a/build/acceptance/features/core/NextcloudTestServerContext.php b/build/acceptance/features/core/NextcloudTestServerContext.php
index 4e0ba05bde9..f8d13a656b9 100644
--- a/build/acceptance/features/core/NextcloudTestServerContext.php
+++ b/build/acceptance/features/core/NextcloudTestServerContext.php
@@ -40,13 +40,12 @@ use Behat\Behat\Hook\Scope\BeforeScenarioScope;
*
* The Nextcloud server is provided by an instance of NextcloudTestServerHelper;
* its class must be specified when this context is created. By default,
- * "NextcloudTestServerDockerHelper" is used, although that can be customized
+ * "NextcloudTestServerLocalHelper" is used, although that can be customized
* using the "nextcloudTestServerHelper" parameter in "behat.yml". In the same
* way, the parameters to be passed to the helper when it is created can be
* customized using the "nextcloudTestServerHelperParameters" parameter, which
* is an array (without keys) with the value of the parameters in the same order
- * as in the constructor of the helper class (by default,
- * [ "nextcloud-local-test-acceptance", "selenium-nextcloud-local-test-acceptance" ]).
+ * as in the constructor of the helper class (by default, [ ]).
*
* Example of custom parameters in "behat.yml":
* default:
@@ -54,16 +53,10 @@ use Behat\Behat\Hook\Scope\BeforeScenarioScope;
* default:
* contexts:
* - NextcloudTestServerContext:
- * nextcloudTestServerHelper: NextcloudTestServerDockerHelper
+ * nextcloudTestServerHelper: NextcloudTestServerCustomHelper
* nextcloudTestServerHelperParameters:
- * - nextcloud-local-test-acceptance-custom-image
- * - selenium-nextcloud-local-test-acceptance-custom-image
- *
- * Note that using Docker containers as a regular user requires giving access to
- * the Docker daemon to that user. Unfortunately, that makes possible for that
- * user to get root privileges for the system. Please see the
- * NextcloudTestServerDockerHelper documentation for further information on this
- * issue.
+ * - first-parameter-value
+ * - second-parameter-value
*/
class NextcloudTestServerContext implements Context {
@@ -80,8 +73,8 @@ class NextcloudTestServerContext implements Context {
* @param array $nextcloudTestServerHelperParameters the parameters for the
* constructor of the $nextcloudTestServerHelper class.
*/
- public function __construct($nextcloudTestServerHelper = "NextcloudTestServerDockerHelper",
- $nextcloudTestServerHelperParameters = [ "nextcloud-local-test-acceptance", "selenium-nextcloud-local-test-acceptance" ]) {
+ public function __construct($nextcloudTestServerHelper = "NextcloudTestServerLocalHelper",
+ $nextcloudTestServerHelperParameters = [ ]) {
$nextcloudTestServerHelperClass = new ReflectionClass($nextcloudTestServerHelper);
if ($nextcloudTestServerHelperParameters === null) {
diff --git a/build/acceptance/run-local.sh b/build/acceptance/run-local.sh
index 900b0ba30a4..a235871624e 100755
--- a/build/acceptance/run-local.sh
+++ b/build/acceptance/run-local.sh
@@ -43,20 +43,6 @@ SCENARIO_TO_RUN=$1
composer install
-# Although Behat documentation states that using the BEHAT_PARAMS environment
-# variable "You can set any value for any option that is available in a
-# behat.yml file" this is currently not true for the constructor parameters of
-# contexts (see https://github.com/Behat/Behat/issues/983). Thus, the default
-# "behat.yml" configuration file has to be adjusted to provide the appropriate
-# parameters for NextcloudTestServerContext.
-ORIGINAL="\
- - NextcloudTestServerContext"
-REPLACEMENT="\
- - NextcloudTestServerContext:\n\
- nextcloudTestServerHelper: NextcloudTestServerLocalHelper\n\
- nextcloudTestServerHelperParameters:"
-sed "s/$ORIGINAL/$REPLACEMENT/" config/behat.yml > config/behat-local.yml
-
cd ../../
echo "Installing and configuring Nextcloud server"
@@ -72,4 +58,4 @@ cd build/acceptance
echo "Waiting for Selenium"
timeout 60s bash -c "while ! curl 127.0.0.1:4444 >/dev/null 2>&1; do sleep 1; done"
-vendor/bin/behat --config=config/behat-local.yml $SCENARIO_TO_RUN
+vendor/bin/behat $SCENARIO_TO_RUN