mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-18 11:28:48 -06:00
Merge branch 'master' into try-gookikt-config
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# The test runner source for API tests
|
||||
CORE_COMMITID=4e808c1a89462fb91d2439dc3d9c490ebced3139
|
||||
CORE_COMMITID=6a55f750d8a3f34c6c7772355f9281ffb8ffb4ca
|
||||
CORE_BRANCH=master
|
||||
|
||||
# The test runner source for UI tests
|
||||
|
||||
52
.drone.star
52
.drone.star
@@ -133,7 +133,7 @@ def main(ctx):
|
||||
pipelines = []
|
||||
|
||||
test_pipelines = \
|
||||
checkForRecentBuilds(ctx) + \
|
||||
cancelPreviousBuilds() + \
|
||||
[buildOcisBinaryForTesting(ctx)] + \
|
||||
testOcisModules(ctx) + \
|
||||
testPipelines(ctx)
|
||||
@@ -187,48 +187,28 @@ def testOcisModules(ctx):
|
||||
|
||||
return pipelines + [scan_result_upload]
|
||||
|
||||
def checkForRecentBuilds(ctx):
|
||||
pipelines = []
|
||||
|
||||
result = {
|
||||
def cancelPreviousBuilds():
|
||||
return [{
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "stop-recent-builds",
|
||||
"steps": stopRecentBuilds(ctx),
|
||||
"depends_on": [],
|
||||
"name": "cancel-previous-builds",
|
||||
"clone": {
|
||||
"disable": True,
|
||||
},
|
||||
"steps": [{
|
||||
"name": "cancel-previous-builds",
|
||||
"image": "owncloudci/drone-cancel-previous-builds",
|
||||
"settings": {
|
||||
"DRONE_TOKEN": {
|
||||
"from_secret": "drone_token",
|
||||
},
|
||||
},
|
||||
}],
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/tags/**",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
pipelines.append(result)
|
||||
|
||||
return pipelines
|
||||
|
||||
def stopRecentBuilds(ctx):
|
||||
return [{
|
||||
"name": "stop-recent-builds",
|
||||
"image": "drone/cli:alpine",
|
||||
"environment": {
|
||||
"DRONE_SERVER": "https://drone.owncloud.com",
|
||||
"DRONE_TOKEN": {
|
||||
"from_secret": "drone_token",
|
||||
},
|
||||
},
|
||||
"commands": [
|
||||
"drone build ls %s --status running > /drone/src/recentBuilds.txt" % ctx.repo.slug,
|
||||
"drone build info %s ${DRONE_BUILD_NUMBER} > /drone/src/thisBuildInfo.txt" % ctx.repo.slug,
|
||||
"cd /drone/src && ./tests/acceptance/cancelBuilds.sh",
|
||||
],
|
||||
"when": {
|
||||
"event": [
|
||||
"pull_request",
|
||||
],
|
||||
},
|
||||
}]
|
||||
|
||||
def testPipelines(ctx):
|
||||
|
||||
@@ -6,7 +6,8 @@ gomplate \
|
||||
-f /etc/templates/oidc.config.php \
|
||||
-o ${OWNCLOUD_VOLUME_CONFIG}/oidc.config.php
|
||||
|
||||
occ market:upgrade --major openidconnect # we need a release including https://github.com/owncloud/openidconnect/pull/180
|
||||
# we need at least version 2.1.0 of the oenidconnect app
|
||||
occ market:upgrade --major openidconnect
|
||||
occ app:enable openidconnect
|
||||
|
||||
# user LDAP
|
||||
|
||||
@@ -9,10 +9,6 @@ geekdocFilePath: oc10_ocis_parallel.md
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
{{< hint warning >}}
|
||||
This deployment example currently has known issues. See [github.com/owncloud/ocis/issues/2549](https://github.com/owncloud/ocis/issues/2549) for more information.
|
||||
{{< /hint >}}
|
||||
|
||||
## Overview
|
||||
|
||||
- This setup reflects [stage 6 of the oC10 to oCIS migration plan]({{< ref "migration#stage-6-parallel-deployment" >}})
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
SCRIPT_PATH=$(dirname "$0")
|
||||
SCRIPT_PATH=$( cd "${SCRIPT_PATH}" && pwd ) # normalized and made absolute
|
||||
OWNCLOUD_OCIS="owncloud/ocis"
|
||||
|
||||
# The recentBuilds.txt file contains all the information of the PR whose builds are recently running.
|
||||
# Therefore, to filter out the BuildID and the Reference from all the recent builds which are running,
|
||||
# the following awk command is used and the output containing the BuildId and the Reference of each
|
||||
# builds/prs are stored in the filteredDescriptions.txt file.
|
||||
echo ${SCRIPT_PATH}
|
||||
awk "/Build #|Ref: refs\/pull/" ${SCRIPT_PATH}/../../recentBuilds.txt > ${SCRIPT_PATH}/filteredDescriptions.txt
|
||||
|
||||
# The thisBuildInfo.txt file contains the information of the current Build, including the BuildID, Reference, and
|
||||
# other information of that particular build. To get the reference number/ pr number of the recent build,
|
||||
# the following awk command and grep commands are used, where the Reference part ("Ref: refs/pull/5496/head")
|
||||
# is stored in the "thisBuildFiltered.txt" file. From the reference, only the pr/reference number is extracted into
|
||||
# the "NUMBER" variable.
|
||||
awk "/Ref: refs\/pull/" ${SCRIPT_PATH}/../../thisBuildInfo.txt > ${SCRIPT_PATH}/thisBuildFiltered.txt
|
||||
NUMBER=$(grep -o -E "[0-9]+" ${SCRIPT_PATH}/thisBuildFiltered.txt)
|
||||
referenceNum="Ref: refs/pull/"$NUMBER"/head"
|
||||
|
||||
# From all the recent builds, the information about the BuildID and the reference which was stored in the
|
||||
# "filteredDescriptions.txt" file, only the BuildID part from each of the buildInformation whose Reference is
|
||||
# exactly same as that of the current build reference is filtered and stored in the "buildsToStop.txt" file.
|
||||
# The buildIDs and the reference information of each build is stored sequentially in the "filteredDescriptions.txt" file as:
|
||||
|
||||
# "Build #<buildID-1>"
|
||||
# "<ReferenceInformationOfBuildID-1>"
|
||||
# "Build #<buildID-2>"
|
||||
# "<ReferenceInformationOfBuildID-2>"
|
||||
# "Build #<buildID-n>"
|
||||
# "<ReferenceInformationOfBuildID-n>"
|
||||
|
||||
# Therefore the following awk command extracts each lines just above the expected reference information.
|
||||
awk -v ref="$referenceNum" 'index($0,ref){print p} {p=$0}' ${SCRIPT_PATH}/filteredDescriptions.txt > ${SCRIPT_PATH}/buildsToStop.txt
|
||||
|
||||
|
||||
# The "buildsToStop.txt" file now contains the buildIDs of the recent builds whose reference id was equal to the reference of the
|
||||
# current pr/build.
|
||||
|
||||
# "Build #<BuildID-1>"
|
||||
# "Build #<BuildID-2>"
|
||||
# "Build #<BuildID-3>"
|
||||
# "Build #<BuildID-4>"
|
||||
# "Build #<BuildID-m>"
|
||||
|
||||
# For each build in the "buildsToStop.txt" file, if the build number is older than the current drone build number, the build is cancelled.
|
||||
|
||||
while IFS="" read -r p || [ -n "$p" ]
|
||||
do
|
||||
printf '%s\n' "$p"
|
||||
buildNumber=$(echo "$p" | awk -F'#' '{print $(2)}')
|
||||
|
||||
if [ $DRONE_BUILD_NUMBER \> "$buildNumber" ]
|
||||
then
|
||||
echo "CANCELLING BUILD: " $buildNumber
|
||||
drone build stop $OWNCLOUD_OCIS $buildNumber
|
||||
fi
|
||||
|
||||
done <${SCRIPT_PATH}/buildsToStop.txt
|
||||
|
||||
@@ -1261,6 +1261,7 @@ Scenario Outline: Unauthenticated call
|
||||
- [apiCapabilities/capabilities.feature:737](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L737)
|
||||
- [apiCapabilities/capabilities.feature:766](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L766)
|
||||
- [apiCapabilities/capabilities.feature:795](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L795)
|
||||
- [apiCapabilities/capabilities.feature:827](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L827)
|
||||
- [apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature:25](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature#L25)
|
||||
- [apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature:26](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature#L26)
|
||||
- [apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature:44](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature#L44)
|
||||
|
||||
@@ -16,7 +16,7 @@ Feature: Upload files into a space
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" creates a folder "mainFolder" in space "Project Venus" using the WebDav Api
|
||||
Then the HTTP status code should be "201"
|
||||
And the space "Project Venus" should contain these entries:
|
||||
And for user "Alice" the space "Project Venus" should contain these entries:
|
||||
| mainFolder |
|
||||
|
||||
Scenario: Bob creates a folder via the Graph api in a space, he expects a 404 code and Alice checks that this folder does not exist
|
||||
@@ -25,7 +25,7 @@ Feature: Upload files into a space
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Bob" creates a folder "forAlice" in space "Project Merkur" using the WebDav Api
|
||||
Then the HTTP status code should be "404"
|
||||
And the space "Project Merkur" should not contain these entries:
|
||||
And for user "Alice" the space "Project Merkur" should not contain these entries:
|
||||
| forAlice |
|
||||
|
||||
Scenario: Alice creates a folder via Graph api and uploads a file
|
||||
@@ -36,7 +36,7 @@ Feature: Upload files into a space
|
||||
Then the HTTP status code should be "201"
|
||||
And user "Alice" uploads a file inside space "Project Moon" with content "Test" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the space "Project Moon" should contain these entries:
|
||||
And for user "Alice" the space "Project Moon" should contain these entries:
|
||||
| NewFolder |
|
||||
| test.txt |
|
||||
|
||||
@@ -46,7 +46,7 @@ Feature: Upload files into a space
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Bob" uploads a file inside space "Project Pluto" with content "Test" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "404"
|
||||
And the space "Project Pluto" should not contain these entries:
|
||||
And for user "Alice" the space "Project Pluto" should not contain these entries:
|
||||
| test.txt |
|
||||
|
||||
Scenario: Alice creates uploads a file and checks her quota
|
||||
@@ -61,8 +61,7 @@ Feature: Upload files into a space
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And user "Alice" uploads a file inside space "Project Saturn" with content "Test" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
When user "Alice" lists the content of the space with the name "Project Saturn" using the WebDav Api
|
||||
Then the propfind result of the space should contain these entries:
|
||||
And for user "Alice" the space "Project Saturn" should contain these entries:
|
||||
| test.txt |
|
||||
And user "Alice" lists all available spaces via the GraphApi
|
||||
And the json responded should contain a space "Project Saturn" with these key and value pairs:
|
||||
|
||||
@@ -584,6 +584,34 @@ class SpacesContext implements Context {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^for user "([^"]*)" the space "([^"]*)" should (not|)\s?contain these (?:files|entries):$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $spaceName
|
||||
* @param string $shouldOrNot (not|)
|
||||
* @param TableNode $expectedFiles
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
public function usertheSpaceShouldContainEntries(
|
||||
string $user,
|
||||
string $spaceName,
|
||||
string $shouldOrNot,
|
||||
TableNode $expectedFiles
|
||||
):void {
|
||||
$this->theUserListsTheContentOfAPersonalSpaceRootUsingTheWebDAvApi(
|
||||
$user,
|
||||
$spaceName
|
||||
);
|
||||
$this->propfindResultShouldContainEntries(
|
||||
$shouldOrNot,
|
||||
$expectedFiles,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the json responded should contain a space "([^"]*)" with these key and value pairs:$/
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user