Skip to content

Commit fbbf33c

Browse files
committedFeb 22, 2021
used environment variable for language setup
1 parent df5e095 commit fbbf33c

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed
 

‎.drone.star

+1-1
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ def acceptance(ctx):
13381338
'replaceUsernames': False,
13391339
'extraSetup': [],
13401340
'extraServices': [],
1341-
'extraEnvironment': {},
1341+
'extraEnvironment': {'OC_LANGUAGE':'en-EN'},
13421342
'extraCommandsBeforeTestRun': [],
13431343
'extraApps': {},
13441344
'useBundledApp': False,

‎tests/acceptance/features/bootstrap/OCSContext.php

+5
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,11 @@ public function theOcsStatusCodeShouldBeOr($statusCode1, $statusCode2) {
713713
* @return void
714714
*/
715715
public function theOCSStatusMessageShouldBe($statusMessage, $language=null) {
716+
if (!isset($language)) {
717+
if (\getenv('OC_LANGUAGE') !== false) {
718+
$language = \getenv('OC_LANGUAGE');
719+
}
720+
}
716721
$statusMessage = $this->getActualStatusMessage($statusMessage, $language);
717722

718723
Assert::assertEquals(

‎tests/acceptance/features/bootstrap/Sharing.php

+5
Original file line numberDiff line numberDiff line change
@@ -1631,6 +1631,11 @@ public function theUserGetsInfoOfLastShareUsingTheSharingApi() {
16311631
*/
16321632
public function userGetsInfoOfLastShareUsingTheSharingApi($user, $language=null) {
16331633
$share_id = $this->getLastShareIdOf($user);
1634+
if (!isset($language)) {
1635+
if (\getenv('OC_LANGUAGE') !== false) {
1636+
$language = \getenv('OC_LANGUAGE');
1637+
}
1638+
}
16341639
$this->getShareData($user, $share_id, $language);
16351640
}
16361641

0 commit comments

Comments
 (0)
Please sign in to comment.