diff options
author | Robin Appelman <robin@icewind.nl> | 2016-11-16 14:43:38 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-01-02 16:17:19 +0300 |
commit | ac2542f0f074cc7ec0f5ffdc6970a9981a4fac02 (patch) | |
tree | 93747e5dff6059e52d664ea2c0c18496db001d90 | |
parent | 17d2b25ad4c8ec75dfe0ecd0a2d84cd7b5e4f89b (diff) |
add ci support for s3 object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | .drone.yml | 17 | ||||
-rwxr-xr-x | autotest.sh | 3 | ||||
-rw-r--r-- | tests/lib/Files/ObjectStore/S3Test.php | 3 | ||||
-rw-r--r-- | tests/preseed-config.php | 17 |
4 files changed, 40 insertions, 0 deletions
diff --git a/.drone.yml b/.drone.yml index 20f6575f37f..0fec56bd8e7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -415,6 +415,16 @@ pipeline: when: matrix: 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: image: nextcloudci/php7.0-memcached:php7.0-memcached-6 commands: @@ -462,6 +472,8 @@ matrix: - TESTS: litmus-v2 - TESTS: caldavtester - TESTS: carddavtester + - TESTS: object-store + OBJECT_STORE: s3 - TESTS: sqlite-php7.0-samba-native - TESTS: sqlite-php7.0-samba-non-native - TEST: memcache-memcached @@ -517,3 +529,8 @@ services: when: matrix: DB: mysqlmb4 + fake-s3: + image: lphoward/fake-s3 + when: + matrix: + OBJECT_STORE: s3 diff --git a/autotest.sh b/autotest.sh index f42ca41de9d..ded3cec6091 100755 --- a/autotest.sh +++ b/autotest.sh @@ -344,6 +344,9 @@ function execute_tests { if [ "$TEST_SELECTION" == "NODB" ]; then GROUP='--exclude-group DB,SLOWDB' fi + if [ "$TEST_SELECTION" == "PRIMARY-s3" ]; then + GROUP='--group PRIMARY-s3' + fi COVER='' if [ -z "$NOCOVERAGE" ]; then diff --git a/tests/lib/Files/ObjectStore/S3Test.php b/tests/lib/Files/ObjectStore/S3Test.php index 10afb9a7aa8..b93e9beebdc 100644 --- a/tests/lib/Files/ObjectStore/S3Test.php +++ b/tests/lib/Files/ObjectStore/S3Test.php @@ -23,6 +23,9 @@ namespace Test\Files\ObjectStore; use OC\Files\ObjectStore\S3; +/** + * @group PRIMARY-s3 + */ class S3Test extends ObjectStoreTest { /** * @return \OCP\Files\ObjectStore\IObjectStore diff --git a/tests/preseed-config.php b/tests/preseed-config.php index e2c5a55fa58..53579406472 100644 --- a/tests/preseed-config.php +++ b/tests/preseed-config.php @@ -21,3 +21,20 @@ if (is_dir(OC::$SERVERROOT.'/apps2')) { if (substr(strtolower(PHP_OS), 0, 3) === 'win') { $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 + ) + ]; +} |