mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-30 17:00:57 -06:00
Merge pull request #81 from opencloud-eu/php-setup-and-run-all-tests
php-setup-and-run-all-tests
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -37,6 +37,7 @@ vendor-php
|
||||
|
||||
# API acceptance tests - auto-generated files
|
||||
.php-cs-fixer.cache
|
||||
suite-logs
|
||||
|
||||
# QA activity reports
|
||||
tests/qa-activity-report/reports/
|
||||
|
||||
@@ -101,7 +101,7 @@ class SharingHelper {
|
||||
string $xRequestId = '',
|
||||
?string $shareWith = null,
|
||||
?bool $publicUpload = false,
|
||||
string $sharePassword = null,
|
||||
?string $sharePassword = null,
|
||||
$permissions = null,
|
||||
?string $linkName = null,
|
||||
?string $expireDate = null,
|
||||
|
||||
@@ -315,7 +315,7 @@ class WebDavPropertiesContext implements Context {
|
||||
string $propertyName,
|
||||
string $path,
|
||||
string $propertyValue,
|
||||
string $namespace = null,
|
||||
?string $namespace = null,
|
||||
): ResponseInterface {
|
||||
$user = $this->featureContext->getActualUsername($user);
|
||||
return WebDavHelper::proppatch(
|
||||
@@ -648,7 +648,7 @@ class WebDavPropertiesContext implements Context {
|
||||
public function checkResponseContainsProperty(
|
||||
ResponseInterface $response,
|
||||
string $key,
|
||||
string $namespaceString = null
|
||||
?string $namespaceString = null
|
||||
): SimpleXMLElement {
|
||||
$xmlPart = HttpRequestHelper::getResponseXml($response, __METHOD__);
|
||||
;
|
||||
|
||||
68
tests/acceptance/run_all_tests.sh
Executable file
68
tests/acceptance/run_all_tests.sh
Executable file
@@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
|
||||
# LOCAL TEST WITHOUT EXTRA ENVS
|
||||
TEST_SERVER_URL="https://localhost:9200"
|
||||
EXPECTED_FAILURES_FILE="tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md"
|
||||
|
||||
# List of suites to run
|
||||
SUITES=(
|
||||
"apiArchiver"
|
||||
"apiContract"
|
||||
"apiCors"
|
||||
"apiAsyncUpload"
|
||||
"apiDownloads"
|
||||
"apiDepthInfinity"
|
||||
"apiLocks"
|
||||
"apiActivities"
|
||||
"apiSettings"
|
||||
"apiGraph"
|
||||
"apiServiceAvailability"
|
||||
"apiGraphUserGroup"
|
||||
"apiSpaces"
|
||||
"apiSpacesShares"
|
||||
"apiSpacesDavOperation"
|
||||
"apiSearch1"
|
||||
"apiSearch2"
|
||||
"apiReshare"
|
||||
"apiSharingNg1"
|
||||
"apiSharingNg2"
|
||||
"apiSharingNgShareInvitation"
|
||||
"apiSharingNgLinkSharePermission"
|
||||
"apiSharingNgLinkShareRoot"
|
||||
"apiAccountsHashDifficulty"
|
||||
)
|
||||
|
||||
# Create log directory
|
||||
LOG_DIR="./suite-logs"
|
||||
mkdir -p "$LOG_DIR"
|
||||
|
||||
SUCCESS_COUNT=0
|
||||
FAILURE_COUNT=0
|
||||
|
||||
for SUITE in "${SUITES[@]}"; do
|
||||
echo "=============================================="
|
||||
echo "Running suite: $SUITE"
|
||||
echo "=============================================="
|
||||
|
||||
LOG_FILE="$LOG_DIR/${SUITE}.log"
|
||||
|
||||
# Run suite
|
||||
make test-acceptance-api TEST_SERVER_URL=$TEST_SERVER_URL EXPECTED_FAILURES_FILE=$EXPECTED_FAILURES_FILE BEHAT_SUITE=$SUITE > "$LOG_FILE" 2>&1
|
||||
|
||||
# Check if suite was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✅ Suite $SUITE completed successfully."
|
||||
((SUCCESS_COUNT++))
|
||||
else
|
||||
echo "❌ Suite $SUITE failed. Check log: $LOG_FILE"
|
||||
((FAILURE_COUNT++))
|
||||
fi
|
||||
done
|
||||
|
||||
# Report summary
|
||||
echo "=============================================="
|
||||
echo "Test Summary:"
|
||||
echo "✅ Successful suites: $SUCCESS_COUNT"
|
||||
echo "❌ Failed suites: $FAILURE_COUNT"
|
||||
echo "Logs saved in: $LOG_DIR"
|
||||
echo "=============================================="
|
||||
Reference in New Issue
Block a user