tests: error handling
tests: remove unnecessary logs
This commit is contained in:
@@ -1006,11 +1006,9 @@ def localApiTests(ctx, name, suites, storage = "ocis", extra_environment = {}, w
|
|||||||
expected_failures_file = "%s/expected-failures-localAPI-on-%s-storage.md" % (test_dir, storage.upper())
|
expected_failures_file = "%s/expected-failures-localAPI-on-%s-storage.md" % (test_dir, storage.upper())
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
"PATH_TO_OCIS": dirs["base"],
|
|
||||||
"TEST_SERVER_URL": OCIS_URL,
|
"TEST_SERVER_URL": OCIS_URL,
|
||||||
"TEST_SERVER_FED_URL": OCIS_FED_URL,
|
"TEST_SERVER_FED_URL": OCIS_FED_URL,
|
||||||
"OCIS_REVA_DATA_ROOT": "%s" % (dirs["ocisRevaDataRoot"] if storage == "owncloud" else ""),
|
"OCIS_REVA_DATA_ROOT": "%s" % (dirs["ocisRevaDataRoot"] if storage == "owncloud" else ""),
|
||||||
"OCIS_SKELETON_STRATEGY": "%s" % ("copy" if storage == "owncloud" else "upload"),
|
|
||||||
"SEND_SCENARIO_LINE_REFERENCES": "true",
|
"SEND_SCENARIO_LINE_REFERENCES": "true",
|
||||||
"STORAGE_DRIVER": storage,
|
"STORAGE_DRIVER": storage,
|
||||||
"BEHAT_SUITES": ",".join(suites),
|
"BEHAT_SUITES": ",".join(suites),
|
||||||
@@ -1206,10 +1204,8 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, with_remote_php = Fa
|
|||||||
"name": "oC10ApiTests-%s" % part_number,
|
"name": "oC10ApiTests-%s" % part_number,
|
||||||
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
||||||
"environment": {
|
"environment": {
|
||||||
"PATH_TO_OCIS": "%s" % dirs["base"],
|
|
||||||
"TEST_SERVER_URL": OCIS_URL,
|
"TEST_SERVER_URL": OCIS_URL,
|
||||||
"OCIS_REVA_DATA_ROOT": "%s" % (dirs["ocisRevaDataRoot"] if storage == "owncloud" else ""),
|
"OCIS_REVA_DATA_ROOT": "%s" % (dirs["ocisRevaDataRoot"] if storage == "owncloud" else ""),
|
||||||
"OCIS_SKELETON_STRATEGY": "%s" % ("copy" if storage == "owncloud" else "upload"),
|
|
||||||
"SEND_SCENARIO_LINE_REFERENCES": "true",
|
"SEND_SCENARIO_LINE_REFERENCES": "true",
|
||||||
"STORAGE_DRIVER": storage,
|
"STORAGE_DRIVER": storage,
|
||||||
"BEHAT_FILTER_TAGS": filterTags,
|
"BEHAT_FILTER_TAGS": filterTags,
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ class BehatHelper {
|
|||||||
try {
|
try {
|
||||||
return $environment->getContext($class);
|
return $environment->getContext($class);
|
||||||
} catch (ContextNotFoundException $e) {
|
} catch (ContextNotFoundException $e) {
|
||||||
print_r("[INFO] '$class' context not found. Registering...\n");
|
|
||||||
$context = new $class();
|
$context = new $class();
|
||||||
$environment->registerContext($context);
|
$environment->registerContext($context);
|
||||||
if (\method_exists($context, 'before')) {
|
if (\method_exists($context, 'before')) {
|
||||||
|
|||||||
@@ -25,6 +25,19 @@ namespace TestHelpers;
|
|||||||
use Exception;
|
use Exception;
|
||||||
use GuzzleHttp\Exception\GuzzleException;
|
use GuzzleHttp\Exception\GuzzleException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class StorageDriver
|
||||||
|
*
|
||||||
|
* @package TestHelpers
|
||||||
|
*/
|
||||||
|
abstract class StorageDriver {
|
||||||
|
public const OCIS = "OCIS";
|
||||||
|
public const EOS = "EOS";
|
||||||
|
public const OWNCLOUD = "OWNCLOUD";
|
||||||
|
public const S3NG = "S3NG";
|
||||||
|
public const POSIX = "POSIX";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class OcisHelper
|
* Class OcisHelper
|
||||||
*
|
*
|
||||||
@@ -33,6 +46,14 @@ use GuzzleHttp\Exception\GuzzleException;
|
|||||||
* @package TestHelpers
|
* @package TestHelpers
|
||||||
*/
|
*/
|
||||||
class OcisHelper {
|
class OcisHelper {
|
||||||
|
public const STORAGE_DRIVERS = [
|
||||||
|
StorageDriver::OCIS,
|
||||||
|
StorageDriver::EOS,
|
||||||
|
StorageDriver::OWNCLOUD,
|
||||||
|
StorageDriver::S3NG,
|
||||||
|
StorageDriver::POSIX
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -78,42 +99,52 @@ class OcisHelper {
|
|||||||
public static function getStorageDriver():string {
|
public static function getStorageDriver():string {
|
||||||
$storageDriver = (\getenv("STORAGE_DRIVER"));
|
$storageDriver = (\getenv("STORAGE_DRIVER"));
|
||||||
if ($storageDriver === false) {
|
if ($storageDriver === false) {
|
||||||
return "OWNCLOUD";
|
return StorageDriver::OWNCLOUD;
|
||||||
}
|
}
|
||||||
$storageDriver = \strtoupper($storageDriver);
|
$storageDriver = \strtoupper($storageDriver);
|
||||||
if ($storageDriver !== "OCIS" && $storageDriver !== "EOS" && $storageDriver !== "OWNCLOUD" && $storageDriver !== "S3NG" && $storageDriver !== "POSIX") {
|
if (!\in_array($storageDriver, self::STORAGE_DRIVERS)) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
"Invalid storage driver. " .
|
"Invalid storage driver. " .
|
||||||
"STORAGE_DRIVER must be OCIS|EOS|OWNCLOUD|S3NG|POSIX"
|
"STORAGE_DRIVER must be '" . \join(", ", self::STORAGE_DRIVERS) . "'"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $storageDriver;
|
return $storageDriver;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string|null $user
|
* @param array $users
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function deleteRevaUserData(?string $user = ""):void {
|
public static function deleteRevaUserData(?array $users = []): void {
|
||||||
$deleteCmd = self::getDeleteUserDataCommand();
|
$deleteCmd = self::getDeleteUserDataCommand();
|
||||||
if ($deleteCmd === false) {
|
|
||||||
if (self::getStorageDriver() === "OWNCLOUD") {
|
if (self::getStorageDriver() === StorageDriver::POSIX) {
|
||||||
self::recurseRmdir(self::getOcisRevaDataRoot() . $user);
|
\exec($deleteCmd);
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (self::getStorageDriver() === "EOS") {
|
|
||||||
$deleteCmd = \str_replace(
|
foreach ($users as $user) {
|
||||||
"%s",
|
if (\is_array($user)) {
|
||||||
$user[0] . '/' . $user,
|
$user = $user["actualUsername"];
|
||||||
$deleteCmd
|
}
|
||||||
);
|
if ($deleteCmd === false) {
|
||||||
} else {
|
if (self::getStorageDriver() === StorageDriver::OWNCLOUD) {
|
||||||
$deleteCmd = \sprintf($deleteCmd, $user);
|
self::recurseRmdir(self::getOcisRevaDataRoot() . $user);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
} elseif (self::getStorageDriver() === StorageDriver::EOS) {
|
||||||
|
$deleteCmd = \str_replace(
|
||||||
|
"%s",
|
||||||
|
$user[0] . '/' . $user,
|
||||||
|
$deleteCmd
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$deleteCmd = \sprintf($deleteCmd, $user);
|
||||||
|
}
|
||||||
|
\exec($deleteCmd);
|
||||||
}
|
}
|
||||||
\exec($deleteCmd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -90,13 +90,6 @@ trait Provisioning {
|
|||||||
return array_merge($this->createdUsers, $this->createdRemoteUsers);
|
return array_merge($this->createdUsers, $this->createdRemoteUsers);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function someUsersHaveBeenCreated():bool {
|
|
||||||
return (\count($this->createdUsers) > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@@ -353,7 +346,13 @@ trait Provisioning {
|
|||||||
|
|
||||||
$ldifFile = __DIR__ . $suiteParameters['ldapInitialUserFilePath'];
|
$ldifFile = __DIR__ . $suiteParameters['ldapInitialUserFilePath'];
|
||||||
if (!$this->skipImportLdif) {
|
if (!$this->skipImportLdif) {
|
||||||
$this->importLdifFile($ldifFile);
|
try {
|
||||||
|
$this->importLdifFile($ldifFile);
|
||||||
|
} catch (LdapException $err) {
|
||||||
|
if (!\str_contains($err->getMessage(), "Already exists")) {
|
||||||
|
throw $err;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,7 +450,17 @@ trait Provisioning {
|
|||||||
$entry['ownCloudUUID'] = WebDavHelper::generateUUIDv4();
|
$entry['ownCloudUUID'] = WebDavHelper::generateUUIDv4();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->ldap->add($newDN, $entry);
|
try {
|
||||||
|
$this->ldap->add($newDN, $entry);
|
||||||
|
} catch (LdapException $e) {
|
||||||
|
if (\str_contains($e->getMessage(), "Already exists")) {
|
||||||
|
$this->ldap->delete(
|
||||||
|
"uid=" . ldap_escape($entry['uid'], "", LDAP_ESCAPE_DN) . ",ou=" . $this->ldapUsersOU . "," . $this->ldapBaseDN,
|
||||||
|
);
|
||||||
|
OcisHelper::deleteRevaUserData([$entry['uid']]);
|
||||||
|
$this->ldap->add($newDN, $entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->ldapCreatedUsers[] = $setting["userid"];
|
$this->ldapCreatedUsers[] = $setting["userid"];
|
||||||
}
|
}
|
||||||
@@ -482,7 +491,16 @@ trait Provisioning {
|
|||||||
$entry['ownCloudUUID'] = WebDavHelper::generateUUIDv4();
|
$entry['ownCloudUUID'] = WebDavHelper::generateUUIDv4();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->ldap->add($newDN, $entry);
|
try {
|
||||||
|
$this->ldap->add($newDN, $entry);
|
||||||
|
} catch (LdapException $e) {
|
||||||
|
if (\str_contains($e->getMessage(), "Already exists")) {
|
||||||
|
$this->ldap->delete(
|
||||||
|
"cn=" . ldap_escape($group, "", LDAP_ESCAPE_DN) . ",ou=" . $this->ldapGroupsOU . "," . $this->ldapBaseDN,
|
||||||
|
);
|
||||||
|
$this->ldap->add($newDN, $entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
$this->ldapCreatedGroups[] = $group;
|
$this->ldapCreatedGroups[] = $group;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -519,80 +537,6 @@ trait Provisioning {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Manually add skeleton files for a single user on OCIS and reva systems
|
|
||||||
*
|
|
||||||
* @param string $user
|
|
||||||
* @param string $password
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function manuallyAddSkeletonFilesForUser(string $user, string $password):void {
|
|
||||||
$settings = [];
|
|
||||||
$setting["userid"] = $user;
|
|
||||||
$setting["password"] = $password;
|
|
||||||
$settings[] = $setting;
|
|
||||||
$this->manuallyAddSkeletonFiles($settings);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Manually add skeleton files on OCIS and reva systems
|
|
||||||
*
|
|
||||||
* @param array $usersAttributes
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function manuallyAddSkeletonFiles(array $usersAttributes):void {
|
|
||||||
if ($this->isEmptySkeleton()) {
|
|
||||||
// The empty skeleton has no files. There is nothing to do so return early.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$skeletonDir = \getenv("SKELETON_DIR");
|
|
||||||
$revaRoot = \getenv("OCIS_REVA_DATA_ROOT");
|
|
||||||
$skeletonStrategy = \getenv("OCIS_SKELETON_STRATEGY");
|
|
||||||
if (!$skeletonStrategy) {
|
|
||||||
$skeletonStrategy = 'upload'; //slower, but safer, so make it the default
|
|
||||||
}
|
|
||||||
if ($skeletonStrategy !== 'upload' && $skeletonStrategy !== 'copy') {
|
|
||||||
throw new Exception(
|
|
||||||
'Wrong OCIS_SKELETON_STRATEGY environment variable. ' .
|
|
||||||
'OCIS_SKELETON_STRATEGY has to be set to "upload" or "copy"'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!$skeletonDir) {
|
|
||||||
throw new Exception('Missing SKELETON_DIR environment variable, cannot copy skeleton files for OCIS');
|
|
||||||
}
|
|
||||||
if ($skeletonStrategy === 'copy' && !$revaRoot) {
|
|
||||||
throw new Exception(
|
|
||||||
'OCIS_SKELETON_STRATEGY is set to "copy" ' .
|
|
||||||
'but no "OCIS_REVA_DATA_ROOT" given'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if ($skeletonStrategy === 'upload') {
|
|
||||||
foreach ($usersAttributes as $userAttributes) {
|
|
||||||
OcisHelper::recurseUpload(
|
|
||||||
$this->getBaseUrl(),
|
|
||||||
$skeletonDir,
|
|
||||||
$userAttributes['userid'],
|
|
||||||
$userAttributes['password'],
|
|
||||||
$this->getStepLineRef()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($skeletonStrategy === 'copy') {
|
|
||||||
foreach ($usersAttributes as $userAttributes) {
|
|
||||||
$user = $userAttributes['userid'];
|
|
||||||
$dataDir = $revaRoot . "$user/files";
|
|
||||||
if (!\file_exists($dataDir)) {
|
|
||||||
\mkdir($dataDir, 0777, true);
|
|
||||||
}
|
|
||||||
OcisHelper::recurseCopy($skeletonDir, $dataDir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates multiple users
|
* Creates multiple users
|
||||||
*
|
*
|
||||||
@@ -717,56 +661,6 @@ trait Provisioning {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @When /^the administrator sends a user creation request for user "([^"]*)" password "([^"]*)" using the provisioning API$/
|
|
||||||
*
|
|
||||||
* @param string $user
|
|
||||||
* @param string $password
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function adminSendsUserCreationRequestUsingTheProvisioningApi(string $user, string $password):void {
|
|
||||||
$user = $this->getActualUsername($user);
|
|
||||||
$password = $this->getActualPassword($password);
|
|
||||||
$email = $user . '@owncloud.com';
|
|
||||||
$bodyTable = new TableNode(
|
|
||||||
[
|
|
||||||
['userid', $user],
|
|
||||||
['password', $password],
|
|
||||||
['username', $user],
|
|
||||||
['email', $email]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$this->emptyLastHTTPStatusCodesArray();
|
|
||||||
$this->emptyLastOCSStatusCodesArray();
|
|
||||||
$this->ocsContext->sendRequestToOcsEndpoint(
|
|
||||||
$this->getAdminUsername(),
|
|
||||||
"POST",
|
|
||||||
"/cloud/users",
|
|
||||||
$bodyTable
|
|
||||||
);
|
|
||||||
$this->pushToLastStatusCodesArrays();
|
|
||||||
$success = $this->theHTTPStatusCodeWasSuccess();
|
|
||||||
$this->addUserToCreatedUsersList(
|
|
||||||
$user,
|
|
||||||
$password,
|
|
||||||
null,
|
|
||||||
$email,
|
|
||||||
null,
|
|
||||||
$success
|
|
||||||
);
|
|
||||||
if ($success) {
|
|
||||||
OcisHelper::createEOSStorageHome(
|
|
||||||
$this->getBaseUrl(),
|
|
||||||
$user,
|
|
||||||
$password,
|
|
||||||
$this->getStepLineRef()
|
|
||||||
);
|
|
||||||
$this->manuallyAddSkeletonFilesForUser($user, $password);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $username
|
* @param string $username
|
||||||
* @param string|null $password
|
* @param string|null $password
|
||||||
@@ -2065,10 +1959,8 @@ trait Provisioning {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function afterScenario():void {
|
public function afterScenario():void {
|
||||||
if ($this->someUsersHaveBeenCreated()) {
|
if (OcisHelper::isTestingOnReva()) {
|
||||||
foreach ($this->getCreatedUsers() as $user) {
|
OcisHelper::deleteRevaUserData($this->getCreatedUsers());
|
||||||
OcisHelper::deleteRevaUserData($user["actualUsername"]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isTestingWithLdap()) {
|
if ($this->isTestingWithLdap()) {
|
||||||
@@ -2173,31 +2065,4 @@ trait Provisioning {
|
|||||||
$actualPassword
|
$actualPassword
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the name of the smallest available skeleton, to "simulate" without skeleton.
|
|
||||||
*
|
|
||||||
* In ownCloud 10 there is always a skeleton directory. If none is specified
|
|
||||||
* then whatever is in core/skeleton is used. That contains different files
|
|
||||||
* and folders depending on the build that is being tested. So for testing
|
|
||||||
* we have "empty" skeleton that is created on-the-fly by the testing app.
|
|
||||||
* That provides a consistent skeleton for test scenarios that specify
|
|
||||||
* "without skeleton files"
|
|
||||||
*
|
|
||||||
* @return string name of the smallest skeleton folder
|
|
||||||
*/
|
|
||||||
private function getSmallestSkeletonDirName(): string {
|
|
||||||
return "empty";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function isEmptySkeleton(): bool {
|
|
||||||
$skeletonDir = \getenv("SKELETON_DIR");
|
|
||||||
if (($skeletonDir !== false) && (\basename($skeletonDir) === $this->getSmallestSkeletonDirName() . "Skeleton")) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,7 +216,6 @@ class PublicWebDavContext implements Context {
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function thePublicRenamesFileFromTheLastPublicShareUsingThePasswordPasswordAndOldPublicWebdavApi(string $fileName, string $toName, string $password):void {
|
public function thePublicRenamesFileFromTheLastPublicShareUsingThePasswordPasswordAndOldPublicWebdavApi(string $fileName, string $toName, string $password):void {
|
||||||
|
|
||||||
$this->featureContext->setResponse(
|
$this->featureContext->setResponse(
|
||||||
$this->renameFileFromPublicShare($fileName, $toName, $password)
|
$this->renameFileFromPublicShare($fileName, $toName, $password)
|
||||||
);
|
);
|
||||||
@@ -496,7 +495,6 @@ class PublicWebDavContext implements Context {
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function thePublicOverwritesFileWithContentUsingWebDavApi(string $filename, string $body):void {
|
public function thePublicOverwritesFileWithContentUsingWebDavApi(string $filename, string $body):void {
|
||||||
|
|
||||||
$response = $this->publicUploadContent($filename, '', $body);
|
$response = $this->publicUploadContent($filename, '', $body);
|
||||||
$this->featureContext->setResponse($response);
|
$this->featureContext->setResponse($response);
|
||||||
}
|
}
|
||||||
@@ -544,7 +542,6 @@ class PublicWebDavContext implements Context {
|
|||||||
string $password,
|
string $password,
|
||||||
string $expectedContent
|
string $expectedContent
|
||||||
):void {
|
):void {
|
||||||
|
|
||||||
$response = $this->downloadPublicFileWithRange(
|
$response = $this->downloadPublicFileWithRange(
|
||||||
"",
|
"",
|
||||||
$password
|
$password
|
||||||
@@ -617,7 +614,6 @@ class PublicWebDavContext implements Context {
|
|||||||
string $password,
|
string $password,
|
||||||
string $content
|
string $content
|
||||||
):void {
|
):void {
|
||||||
|
|
||||||
$response = $this->downloadFileFromPublicFolder(
|
$response = $this->downloadFileFromPublicFolder(
|
||||||
$path,
|
$path,
|
||||||
$password,
|
$password,
|
||||||
|
|||||||
@@ -7,20 +7,15 @@ git config --global advice.detachedHead false
|
|||||||
|
|
||||||
## CONFIGURE TEST
|
## CONFIGURE TEST
|
||||||
|
|
||||||
if [ "$TEST_SOURCE" = "oc10" ]
|
if [ "$TEST_SOURCE" = "oc10" ]; then
|
||||||
then
|
|
||||||
export ACCEPTANCE_TEST_TYPE='core-api'
|
export ACCEPTANCE_TEST_TYPE='core-api'
|
||||||
if [ "$STORAGE_DRIVER" = "ocis" ]
|
if [ "$STORAGE_DRIVER" = "ocis" ]; then
|
||||||
then
|
|
||||||
export OCIS_REVA_DATA_ROOT=''
|
export OCIS_REVA_DATA_ROOT=''
|
||||||
export BEHAT_FILTER_TAGS='~@skipOnOcis-OCIS-Storage'
|
export BEHAT_FILTER_TAGS='~@skipOnOcis-OCIS-Storage'
|
||||||
export OCIS_SKELETON_STRATEGY='upload'
|
|
||||||
export EXPECTED_FAILURES_FILE='/drone/src/tests/acceptance/expected-failures-API-on-OCIS-storage.md'
|
export EXPECTED_FAILURES_FILE='/drone/src/tests/acceptance/expected-failures-API-on-OCIS-storage.md'
|
||||||
elif [ "$STORAGE_DRIVER" = "s3ng" ]
|
elif [ "$STORAGE_DRIVER" = "s3ng" ]; then
|
||||||
then
|
|
||||||
export BEHAT_FILTER_TAGS='~@skip&&~@skipOnOcis-S3NG-Storage'
|
export BEHAT_FILTER_TAGS='~@skip&&~@skipOnOcis-S3NG-Storage'
|
||||||
export OCIS_REVA_DATA_ROOT=''
|
export OCIS_REVA_DATA_ROOT=''
|
||||||
export OCIS_SKELETON_STRATEGY='upload'
|
|
||||||
else
|
else
|
||||||
echo "non existing STORAGE selected"
|
echo "non existing STORAGE selected"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -28,19 +23,13 @@ then
|
|||||||
|
|
||||||
unset BEHAT_SUITE
|
unset BEHAT_SUITE
|
||||||
|
|
||||||
elif [ "$TEST_SOURCE" = "ocis" ]
|
elif [ "$TEST_SOURCE" = "ocis" ]; then
|
||||||
then
|
if [ "$STORAGE_DRIVER" = "ocis" ]; then
|
||||||
|
|
||||||
if [ "$STORAGE_DRIVER" = "ocis" ]
|
|
||||||
then
|
|
||||||
export BEHAT_FILTER_TAGS='~@skip&&~@skipOnOcis-OCIS-Storage'
|
export BEHAT_FILTER_TAGS='~@skip&&~@skipOnOcis-OCIS-Storage'
|
||||||
export OCIS_REVA_DATA_ROOT=''
|
export OCIS_REVA_DATA_ROOT=''
|
||||||
export OCIS_SKELETON_STRATEGY='upload'
|
elif [ "$STORAGE_DRIVER" = "s3ng" ]; then
|
||||||
elif [ "$STORAGE_DRIVER" = "s3ng" ]
|
|
||||||
then
|
|
||||||
export BEHAT_FILTER_TAGS='~@skip&&~@skipOnOcis-S3NG-Storage'
|
export BEHAT_FILTER_TAGS='~@skip&&~@skipOnOcis-S3NG-Storage'
|
||||||
export OCIS_REVA_DATA_ROOT=''
|
export OCIS_REVA_DATA_ROOT=''
|
||||||
export OCIS_SKELETON_STRATEGY='upload'
|
|
||||||
else
|
else
|
||||||
echo "non existing storage selected"
|
echo "non existing storage selected"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -53,8 +42,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "$BEHAT_FEATURE" ]
|
if [ ! -z "$BEHAT_FEATURE" ]; then
|
||||||
then
|
|
||||||
echo "feature selected: " + $BEHAT_FEATURE
|
echo "feature selected: " + $BEHAT_FEATURE
|
||||||
# allow running without filters if its a feature
|
# allow running without filters if its a feature
|
||||||
|
|
||||||
@@ -68,8 +56,7 @@ fi
|
|||||||
|
|
||||||
## RUN TEST
|
## RUN TEST
|
||||||
|
|
||||||
if [[ -z "$TEST_SOURCE" ]]
|
if [[ -z "$TEST_SOURCE" ]]; then
|
||||||
then
|
|
||||||
echo "non existing TEST_SOURCE selected"
|
echo "non existing TEST_SOURCE selected"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ Feature: files and folders exist in the trashbin after being deleted
|
|||||||
| new |
|
| new |
|
||||||
| spaces |
|
| spaces |
|
||||||
|
|
||||||
@issue-3561
|
@issue-3561 @skipOnReva
|
||||||
Scenario Outline: listing other user's trashbin is prohibited for newly recreated user with same name
|
Scenario Outline: listing other user's trashbin is prohibited for newly recreated user with same name
|
||||||
Given using <dav-path-version> DAV path
|
Given using <dav-path-version> DAV path
|
||||||
And user "testtrashbin102" has been created with default attributes and without skeleton files
|
And user "testtrashbin102" has been created with default attributes and without skeleton files
|
||||||
|
|||||||
Reference in New Issue
Block a user