tests: Add environment variable and document commands to run behat tests locally

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2024-07-24 13:35:24 +02:00
parent 210b4a2033
commit 4ec4f86963
2 changed files with 13 additions and 1 deletions

View File

@@ -16,7 +16,13 @@ class ServerContext implements Context {
public function __construct($baseUrl) {
$this->rawBaseUrl = $baseUrl;
$this->__tConstruct($baseUrl . '/index.php/ocs/', ['admin', 'admin'], '123456');
$testServerUrl = getenv('BEHAT_SERVER_URL');
if ($testServerUrl !== false) {
$this->rawBaseUrl = rtrim($testServerUrl, '/');
}
$this->__tConstruct($this->rawBaseUrl . '/ocs/', ['admin', 'admin'], '123456');
}