-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2897 from owncloud/parallel-deploy-tests
[tests-only][full-ci] Added parallel deployment testing setup
- Loading branch information
Showing
15 changed files
with
1,050 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
!config | ||
output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
default: | ||
autoload: | ||
"": "%paths.base%/../features/bootstrap" | ||
|
||
suites: | ||
apiShareManagement: | ||
paths: | ||
- "%paths.base%/../features/apiShareManagement" | ||
context: &common_ldap_suite_context | ||
parameters: | ||
ldapAdminPassword: admin | ||
ldapUsersOU: TestUsers | ||
ldapGroupsOU: TestGroups | ||
ldapInitialUserFilePath: /ldap_users_groups.ldif | ||
contexts: | ||
- ParallelContext: | ||
- FeatureContext: &common_feature_context_params | ||
baseUrl: https://ocis:9200 | ||
adminUsername: admin | ||
adminPassword: admin | ||
regularUserPassword: 1234 | ||
ocPath: apps/testing/api/v1/occ | ||
- OccContext: | ||
|
||
apiWebdavOperations: | ||
paths: | ||
- "%paths.base%/../features/apiWebdavOperations" | ||
context: *common_ldap_suite_context | ||
contexts: | ||
- ParallelContext: | ||
- FeatureContext: *common_feature_context_params | ||
|
||
extensions: | ||
jarnaiz\JUnitFormatter\JUnitFormatterExtension: | ||
filename: report.xml | ||
outputDir: "%paths.base%/../output/" | ||
|
||
rdx\behatvars\BehatVariablesExtension: ~ | ||
|
||
Cjm\Behat\StepThroughExtension: ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dn: ou=TestUsers,dc=owncloud,dc=com | ||
objectClass: organizationalUnit | ||
ou: TestUsers | ||
|
||
dn: ou=TestGroups,dc=owncloud,dc=com | ||
objectClass: organizationalUnit | ||
ou: TestGroups |
10 changes: 10 additions & 0 deletions
10
tests/parallelDeployAcceptance/drone/ldap/ldif/10_owncloud_schema.ldif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This LDIF files describes the ownCloud schema and can be used to | ||
# add two optional attributes: ownCloudQuota and ownCloudUUID | ||
# The ownCloudUUID is used to store a unique, non-reassignable, persistent identifier for users and groups | ||
dn: cn=owncloud,cn=schema,cn=config | ||
objectClass: olcSchemaConfig | ||
cn: owncloud | ||
olcAttributeTypes: ( 1.3.6.1.4.1.39430.1.1.1 NAME 'ownCloudQuota' DESC 'User Quota (e.g. 2 GB)' EQUALITY caseExactMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) | ||
olcAttributeTypes: ( 1.3.6.1.4.1.39430.1.1.2 NAME 'ownCloudUUID' DESC 'A non-reassignable and persistent account ID)' EQUALITY uuidMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.1.16.1 SINGLE-VALUE ) | ||
olcAttributeTypes: ( 1.3.6.1.4.1.39430.1.1.3 NAME 'ownCloudSelector' DESC 'A selector attribute for a route in the ownCloud Infinte Scale proxy)' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) | ||
olcObjectClasses: ( 1.3.6.1.4.1.39430.1.2.1 NAME 'ownCloud' DESC 'ownCloud LDAP Schema' AUXILIARY MAY ( ownCloudQuota $ ownCloudUUID $ ownCloudSelector ) ) |
33 changes: 33 additions & 0 deletions
33
tests/parallelDeployAcceptance/drone/oc10/10-custom-config.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
echo "Writing custom config files..." | ||
|
||
# openidconnect | ||
gomplate \ | ||
-f /etc/templates/oidc.config.php \ | ||
-o ${OWNCLOUD_VOLUME_CONFIG}/oidc.config.php | ||
|
||
# we need at least version 2.1.0 of the oenidconnect app | ||
occ market:upgrade --major openidconnect | ||
occ app:enable openidconnect | ||
|
||
# user LDAP | ||
gomplate \ | ||
-f /etc/templates/ldap-config.tmpl.json \ | ||
-o ${OWNCLOUD_VOLUME_CONFIG}/ldap-config.json | ||
|
||
CONFIG=$(cat ${OWNCLOUD_VOLUME_CONFIG}/ldap-config.json) | ||
occ config:import <<< $CONFIG | ||
|
||
occ ldap:test-config "s01" | ||
occ app:enable user_ldap | ||
/bin/bash -c 'occ user:sync "OCA\User_LDAP\User_Proxy" -r -m remove' | ||
|
||
occ market:upgrade --major web | ||
occ app:enable web | ||
|
||
# enable testing app | ||
echo "Cloning and enabling testing app..." | ||
git clone --depth 1 https://github.com/owncloud/testing.git /var/www/owncloud/apps/testing | ||
occ app:enable testing | ||
|
||
true |
53 changes: 53 additions & 0 deletions
53
tests/parallelDeployAcceptance/drone/oc10/ldap-config.tmpl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"apps": { | ||
"user_ldap": { | ||
"s01has_memberof_filter_support": "0", | ||
"s01home_folder_naming_rule": "", | ||
"s01last_jpegPhoto_lookup": "0", | ||
"s01ldap_agent_password": "{{ .Env.STORAGE_LDAP_BIND_PASSWORD | base64.Encode }}", | ||
"s01ldap_attributes_for_group_search": "", | ||
"s01ldap_attributes_for_user_search": "{{ .Env.LDAP_USERATTRIBUTEFILTERS }}", | ||
"s01ldap_backup_host": "", | ||
"s01ldap_backup_port": "", | ||
"s01ldap_base_groups": "{{ .Env.LDAP_BASE_DN }}", | ||
"s01ldap_base_users": "{{ .Env.LDAP_BASE_DN }}", | ||
"s01ldap_base": "{{ .Env.LDAP_BASE_DN }}", | ||
"s01ldap_cache_ttl": "60", | ||
"s01ldap_configuration_active": "1", | ||
"s01ldap_display_name": "{{ .Env.LDAP_USER_SCHEMA_DISPLAYNAME }}", | ||
"s01ldap_dn": "{{ .Env.STORAGE_LDAP_BIND_DN }}", | ||
"s01ldap_dynamic_group_member_url": "", | ||
"s01ldap_email_attr": "{{ .Env.LDAP_USER_SCHEMA_MAIL }}", | ||
"s01ldap_experienced_admin": "1", | ||
"s01ldap_expert_username_attr": "{{ .Env.LDAP_USER_SCHEMA_NAME_ATTR }}", | ||
"s01ldap_expert_uuid_group_attr": "", | ||
"s01ldap_expert_uuid_user_attr": "{{ .Env.LDAP_USER_SCHEMA_UID }}", | ||
"s01ldap_group_display_name": "{{ .Env.LDAP_GROUP_SCHEMA_DISPLAYNAME }}", | ||
"s01ldap_group_filter_mode": "0", | ||
"s01ldap_group_filter": "{{ .Env.LDAP_GROUPFILTER }}", | ||
"s01ldap_group_member_assoc_attribute": "{{ .Env.LDAP_GROUP_MEMBER_ASSOC_ATTR }}", | ||
"s01ldap_groupfilter_groups": "", | ||
"s01ldap_groupfilter_objectclass": "", | ||
"s01ldap_host": "{{ .Env.LDAP_HOST }}", | ||
"s01ldap_login_filter_mode": "0", | ||
"s01ldap_login_filter": "{{ .Env.LDAP_LOGINFILTER }}", | ||
"s01ldap_loginfilter_attributes": "", | ||
"s01ldap_loginfilter_email": "1", | ||
"s01ldap_loginfilter_username": "1", | ||
"s01ldap_nested_groups": "0", | ||
"s01ldap_override_main_server": "", | ||
"s01ldap_paging_size": "100", | ||
"s01ldap_port": "{{ .Env.LDAP_PORT }}", | ||
"s01ldap_quota_attr": "", | ||
"s01ldap_quota_def": "", | ||
"s01ldap_tls": "0", | ||
"s01ldap_turn_off_cert_check": "0", | ||
"s01ldap_user_display_name_2": "", | ||
"s01ldap_user_filter_mode": "0", | ||
"s01ldap_userfilter_groups": "", | ||
"s01ldap_userfilter_objectclass": "", | ||
"s01ldap_userlist_filter": "{{ .Env.LDAP_USERFILTER }}", | ||
"s01use_memberof_to_detect_membership": "1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
# reference: https://doc.owncloud.com/server/admin_manual/configuration/user/oidc/ | ||
|
||
function getOIDCConfigFromEnv() { | ||
$config = [ | ||
'openid-connect' => [ | ||
'provider-url' => getenv('IDP_OIDC_ISSUER'), | ||
'client-id' => 'oc10', | ||
'client-secret' => getenv('IDP_OIDC_CLIENT_SECRET'), | ||
'loginButtonName' => 'OpenId Connect', | ||
'search-attribute' => 'preferred_username', | ||
'mode' => 'userid', | ||
'autoRedirectOnLoginPage' => true, | ||
'insecure' => true, | ||
'post_logout_redirect_uri' => 'https://' . getenv('CLOUD_DOMAIN'), | ||
], | ||
]; | ||
return $config; | ||
} | ||
|
||
$CONFIG = getOIDCConfigFromEnv(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"log": { | ||
"level": "PROXY_LOG_LEVEL" | ||
}, | ||
"policy_selector": { | ||
"claims": { | ||
"default_policy": "oc10", | ||
"unauthenticated_policy": "oc10" | ||
} | ||
}, | ||
"policies": [ | ||
{ | ||
"name": "ocis", | ||
"routes": [ | ||
{ | ||
"endpoint": "/", | ||
"backend": "http://localhost:9100" | ||
}, | ||
{ | ||
"endpoint": "/.well-known/", | ||
"backend": "http://localhost:9130" | ||
}, | ||
{ | ||
"type": "regex", | ||
"endpoint": "/ocs/v[12].php/cloud/user/signing-key", | ||
"backend": "http://localhost:9110" | ||
}, | ||
{ | ||
"endpoint": "/ocs/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"type": "query", | ||
"endpoint": "/remote.php/?preview=1", | ||
"backend": "http://localhost:9115" | ||
}, | ||
{ | ||
"endpoint": "/remote.php/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/dav/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/webdav/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/status.php", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/index.php/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/index.php/login", | ||
"backend": "http://localhost:9100" | ||
}, | ||
{ | ||
"endpoint": "/login", | ||
"backend": "http://localhost:9100" | ||
}, | ||
{ | ||
"endpoint": "/data", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/graph/", | ||
"backend": "http://localhost:9120" | ||
}, | ||
{ | ||
"endpoint": "/app/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/archiver", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/graph-explorer/", | ||
"backend": "http://localhost:9135" | ||
}, | ||
{ | ||
"endpoint": "/api/v0/settings", | ||
"backend": "http://localhost:9190" | ||
}, | ||
{ | ||
"endpoint": "/settings.js", | ||
"backend": "http://localhost:9190" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "oc10", | ||
"routes": [ | ||
{ | ||
"endpoint": "/", | ||
"backend": "http://oc10:8080" | ||
}, | ||
{ | ||
"endpoint": "/data", | ||
"backend": "http://localhost:9140" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Scenarios that are expected to fail in parallel deployment | ||
|
||
#### [[WIP] Add a SharesStorageProvider and an oc10 sql share manager](https://github.com/owncloud/ocis/pull/2232) | ||
|
||
- [apiShareManagement/acceptShares.feature:22](https://github.com/owncloud/ocis/blob/master/tests/parallelDeployAcceptance/features/apiShareManagement/acceptShares.feature#L22) |
30 changes: 30 additions & 0 deletions
30
tests/parallelDeployAcceptance/features/apiShareManagement/acceptShares.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Sharing tests currently doesn't work | ||
# Accessing oc10 shares from ocis still WIP in PR #2232 | ||
# https://github.com/owncloud/ocis/pull/2232 | ||
@api | ||
Feature: sharing files and folders | ||
As a user | ||
I want to share files/folders with other users | ||
So that I can give access to my files/folders to others | ||
|
||
|
||
Background: | ||
Given using "oc10" as owncloud selector | ||
And the administrator has set the default folder for received shares to "Shares" | ||
And auto-accept shares has been disabled | ||
And using OCS API version "1" | ||
And using new DAV path | ||
And user "Alice" has been created with default attributes and without skeleton files | ||
And user "Brian" has been created with default attributes and without skeleton files | ||
And user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt" | ||
|
||
|
||
Scenario: accept a pending share | ||
Given user "Alice" has shared folder "/textfile.txt" with user "Brian" | ||
And using "ocis" as owncloud selector | ||
When user "Brian" accepts share "/textfile.txt" offered by user "Alice" using the sharing API | ||
Then the OCS status code should be "100" | ||
And the HTTP status code should be "200" | ||
And the sharing API should report to user "Brian" that these shares are in the accepted state | ||
| path | | ||
| /Shares/textfile.txt | |
Oops, something went wrong.