Skip to content
Snippets Groups Projects
Unverified Commit ac2542f0 authored by Robin Appelman's avatar Robin Appelman Committed by Roeland Jago Douma
Browse files

add ci support for s3 object store


Signed-off-by: default avatarRobin Appelman <robin@icewind.nl>
parent 17d2b25a
No related branches found
No related tags found
No related merge requests found
...@@ -415,6 +415,16 @@ pipeline: ...@@ -415,6 +415,16 @@ pipeline:
when: when:
matrix: matrix:
TESTS: db-codecov TESTS: db-codecov
object-store:
image: nextcloudci/php7.0:php7.0-7
commands:
- TEST_SELECTION=PRIMARY-${OBJECT_STORE} ./autotest.sh sqlite
- wget https://codecov.io/bash -O codecov.sh
- sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
- sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
when:
matrix:
TESTS: object-store
memcache-memcached: memcache-memcached:
image: nextcloudci/php7.0-memcached:php7.0-memcached-6 image: nextcloudci/php7.0-memcached:php7.0-memcached-6
commands: commands:
...@@ -462,6 +472,8 @@ matrix: ...@@ -462,6 +472,8 @@ matrix:
- TESTS: litmus-v2 - TESTS: litmus-v2
- TESTS: caldavtester - TESTS: caldavtester
- TESTS: carddavtester - TESTS: carddavtester
- TESTS: object-store
OBJECT_STORE: s3
- TESTS: sqlite-php7.0-samba-native - TESTS: sqlite-php7.0-samba-native
- TESTS: sqlite-php7.0-samba-non-native - TESTS: sqlite-php7.0-samba-non-native
- TEST: memcache-memcached - TEST: memcache-memcached
...@@ -517,3 +529,8 @@ services: ...@@ -517,3 +529,8 @@ services:
when: when:
matrix: matrix:
DB: mysqlmb4 DB: mysqlmb4
fake-s3:
image: lphoward/fake-s3
when:
matrix:
OBJECT_STORE: s3
...@@ -344,6 +344,9 @@ function execute_tests { ...@@ -344,6 +344,9 @@ function execute_tests {
if [ "$TEST_SELECTION" == "NODB" ]; then if [ "$TEST_SELECTION" == "NODB" ]; then
GROUP='--exclude-group DB,SLOWDB' GROUP='--exclude-group DB,SLOWDB'
fi fi
if [ "$TEST_SELECTION" == "PRIMARY-s3" ]; then
GROUP='--group PRIMARY-s3'
fi
COVER='' COVER=''
if [ -z "$NOCOVERAGE" ]; then if [ -z "$NOCOVERAGE" ]; then
......
...@@ -23,6 +23,9 @@ namespace Test\Files\ObjectStore; ...@@ -23,6 +23,9 @@ namespace Test\Files\ObjectStore;
use OC\Files\ObjectStore\S3; use OC\Files\ObjectStore\S3;
/**
* @group PRIMARY-s3
*/
class S3Test extends ObjectStoreTest { class S3Test extends ObjectStoreTest {
/** /**
* @return \OCP\Files\ObjectStore\IObjectStore * @return \OCP\Files\ObjectStore\IObjectStore
......
...@@ -21,3 +21,20 @@ if (is_dir(OC::$SERVERROOT.'/apps2')) { ...@@ -21,3 +21,20 @@ if (is_dir(OC::$SERVERROOT.'/apps2')) {
if (substr(strtolower(PHP_OS), 0, 3) === 'win') { if (substr(strtolower(PHP_OS), 0, 3) === 'win') {
$CONFIG['openssl'] = ['config' => OC::$SERVERROOT . '/tests/data/openssl.cnf']; $CONFIG['openssl'] = ['config' => OC::$SERVERROOT . '/tests/data/openssl.cnf'];
} }
if (getenv('OBJECT_STORE') === 's3') {
$CONFIG['objectstore'] = [
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' => array(
'bucket' => 'nextcloud',
'autocreate' => true,
'key' => 'dummy',
'secret' => 'dummy',
'hostname' => 'localhost',
'port' => 4569,
'use_ssl' => false,
// required for some non amazon s3 implementations
'use_path_style' => true
)
];
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment