Skip to content

Commit

Permalink
fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
ScharfViktor committed Jun 21, 2024
1 parent 20afc41 commit 485bac8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
10 changes: 6 additions & 4 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ def localApiTestPipeline(ctx):
ocisServer(storage, params["accounts_hash_difficulty"], extra_server_environment = params["extraServerEnvironment"], with_wrapper = True, tika_enabled = params["tikaNeeded"]) +
(waitForClamavService() if params["antivirusNeeded"] else []) +
(waitForEmailService() if params["emailNeeded"] else []) +
(ocisServer(storage, params["accounts_hash_difficulty"], deploy_type = "federation-server", extra_server_environment = params["extraServerEnvironment"]) if params["federationServer"] else []) +
(ocisServer(storage, params["accounts_hash_difficulty"], deploy_type = "federation", extra_server_environment = params["extraServerEnvironment"]) if params["federationServer"] else []) +
localApiTests(suite, storage, params["extraEnvironment"]) +
logRequests(),
"services": emailService() if params["emailNeeded"] else [] + clamavService() if params["antivirusNeeded"] else [],
Expand Down Expand Up @@ -2061,7 +2061,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
environment["APP_PROVIDER_WOPI_WOPI_SERVER_EXTERNAL_URL"] = "http://wopiserver:9300"
environment["APP_PROVIDER_WOPI_FOLDER_URL_BASE_URL"] = OCIS_URL

if deploy_type == "federation-server":
if deploy_type == "federation":
environment["OCIS_URL"] = OCIS_FED_URL
container_name = "federation-ocis-server"

Expand All @@ -2085,7 +2085,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =

wrapper_commands = [
"make -C %s build" % dirs["ocisWrapper"],
"%s/bin/ociswrapper serve --bin %s --url %s --admin-username admin --admin-password admin" % (dirs["ocisWrapper"], ocis_bin, OCIS_URL),
"%s/bin/ociswrapper serve --bin %s --url %s --admin-username admin --admin-password admin" % (dirs["ocisWrapper"], ocis_bin, environment["OCIS_URL"]),
]

wait_for_ocis = {
Expand All @@ -2096,7 +2096,9 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
},
"commands": [
# wait for ocis-server to be ready (5 minutes)
'timeout 300 bash -c \'while [ "$(curl -sk -uadmin:admin https://${OCIS_SERVER}:9200/graph/v1.0/users/admin -w %{http_code} -o /dev/null)" != 200 ]; do sleep 1; done\'',
"timeout 300 bash -c 'while [ $(curl -sk -uadmin:admin " +
"%s/graph/v1.0/users/admin " % environment["OCIS_URL"] +
"-w %{http_code} -o /dev/null) != 200 ]; do sleep 1; done'",
],
"depends_on": depends_on,
}
Expand Down
6 changes: 3 additions & 3 deletions tests/TestHelpers/OcmHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
* ownCloud
*
* @author Kiran Parajuli <kiran@jankaritech.com>
* @copyright Copyright (c) 2022 Kiran Parajuli kiran@jankaritech.com
* @author Viktor Scharf <scharf.vi@gmail.com>
* @copyright Copyright (c) 2024 Viktor Scharf <scharf.vi@gmail.com>
*/

namespace TestHelpers;
Expand All @@ -13,7 +13,7 @@
use Psr\Http\Message\ResponseInterface;

/**
* A helper class for managing Graph API requests
* A helper class for managing federation server requests
*/
class OcmHelper {
/**
Expand Down
1 change: 0 additions & 1 deletion tests/acceptance/features/apiOcm/ocm.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Feature: an user shares resources usin ScienceMesh application
As a user
I want to share resources between different ocis instances


Background:
Given these users have been created with default attributes and without skeleton files:
| username |
Expand Down
2 changes: 0 additions & 2 deletions tests/acceptance/features/bootstrap/OcmContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
use TestHelpers\OcisHelper;
use TestHelpers\OcmHelper;

require_once 'bootstrap.php';

/**
* Acceptance test steps related to testing sharing ng features
*/
Expand Down

0 comments on commit 485bac8

Please sign in to comment.