Skip to content

Commit

Permalink
Run litmus CI for both owncloud and ocis storage (#1166)
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis authored Sep 17, 2020
1 parent 8c2f6c8 commit fd2b257
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 10 deletions.
111 changes: 101 additions & 10 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ steps:
---
kind: pipeline
type: docker
name: litmus-oc-old-webdav
name: litmus-owncloud-old-webdav

platform:
os: linux
Expand All @@ -252,8 +252,8 @@ steps:
- cd /drone/src/tests/oc-integration-tests/drone/
- /drone/src/cmd/revad/revad -c frontend.toml &
- /drone/src/cmd/revad/revad -c gateway.toml &
- /drone/src/cmd/revad/revad -c storage-home.toml &
- /drone/src/cmd/revad/revad -c storage-oc.toml &
- /drone/src/cmd/revad/revad -c storage-home-owncloud.toml &
- /drone/src/cmd/revad/revad -c storage-oc-owncloud.toml &
- /drone/src/cmd/revad/revad -c users.toml

- name: sleep-for-revad-start
Expand All @@ -272,7 +272,7 @@ steps:
---
kind: pipeline
type: docker
name: litmus-oc-new-webdav
name: litmus-ocis-old-webdav

platform:
os: linux
Expand All @@ -297,8 +297,99 @@ steps:
- cd /drone/src/tests/oc-integration-tests/drone/
- /drone/src/cmd/revad/revad -c frontend.toml &
- /drone/src/cmd/revad/revad -c gateway.toml &
- /drone/src/cmd/revad/revad -c storage-home.toml &
- /drone/src/cmd/revad/revad -c storage-oc.toml &
- /drone/src/cmd/revad/revad -c storage-home-ocis.toml &
- /drone/src/cmd/revad/revad -c storage-oc-ocis.toml &
- /drone/src/cmd/revad/revad -c users.toml

- name: sleep-for-revad-start
image: golang:1.13
commands:
- sleep 5

- name: litmus-oc-old-webdav
image: owncloud/litmus:latest
environment:
LITMUS_URL: http://revad-services:20080/remote.php/webdav
LITMUS_USERNAME: einstein
LITMUS_PASSWORD: relativity
TESTS: basic http copymove props

---
kind: pipeline
type: docker
name: litmus-owncloud-new-webdav

platform:
os: linux
arch: amd64

trigger:
event:
include:
- pull_request
- tag

steps:
- name: build
image: golang:1.13
commands:
- make build-ci

- name: revad-services
image: golang:1.13
detach: true
commands:
- cd /drone/src/tests/oc-integration-tests/drone/
- /drone/src/cmd/revad/revad -c frontend.toml &
- /drone/src/cmd/revad/revad -c gateway.toml &
- /drone/src/cmd/revad/revad -c storage-home-owncloud.toml &
- /drone/src/cmd/revad/revad -c storage-oc-owncloud.toml &
- /drone/src/cmd/revad/revad -c users.toml

- name: sleep-for-revad-start
image: golang:1.13
commands:
- sleep 5

- name: litmus-oc-new-webdav
image: owncloud/litmus:latest
environment:
# UUID is einstein user, see https://github.com/owncloud/ocis-accounts/blob/8de0530f31ed5ffb0bbb7f7f3471f87f429cb2ea/pkg/service/v0/service.go#L45
LITMUS_URL: http://revad-services:20080/remote.php/dav/files/4c510ada-c86b-4815-8820-42cdf82c3d51
LITMUS_USERNAME: einstein
LITMUS_PASSWORD: relativity
TESTS: basic http copymove props

---
kind: pipeline
type: docker
name: litmus-ocis-new-webdav

platform:
os: linux
arch: amd64

trigger:
event:
include:
- pull_request
- tag

steps:
- name: build
image: golang:1.13
commands:
- make build-ci

- name: revad-services
image: golang:1.13
detach: true
commands:
- cd /drone/src/tests/oc-integration-tests/drone/
- /drone/src/cmd/revad/revad -c frontend.toml &
- /drone/src/cmd/revad/revad -c gateway.toml &
- /drone/src/cmd/revad/revad -c storage-home-ocis.toml &
- /drone/src/cmd/revad/revad -c storage-oc-ocis.toml &
- /drone/src/cmd/revad/revad -c users.toml

- name: sleep-for-revad-start
Expand Down Expand Up @@ -344,8 +435,8 @@ steps:
- /drone/src/cmd/revad/revad -c frontend.toml &
- /drone/src/cmd/revad/revad -c gateway.toml &
- /drone/src/cmd/revad/revad -c shares.toml &
- /drone/src/cmd/revad/revad -c storage-home.toml &
- /drone/src/cmd/revad/revad -c storage-oc.toml &
- /drone/src/cmd/revad/revad -c storage-home-owncloud.toml &
- /drone/src/cmd/revad/revad -c storage-oc-owncloud.toml &
- /drone/src/cmd/revad/revad -c storage-publiclink.toml &
- /drone/src/cmd/revad/revad -c ldap-users.toml

Expand Down Expand Up @@ -418,8 +509,8 @@ steps:
- /drone/src/cmd/revad/revad -c frontend.toml &
- /drone/src/cmd/revad/revad -c gateway.toml &
- /drone/src/cmd/revad/revad -c shares.toml &
- /drone/src/cmd/revad/revad -c storage-home.toml &
- /drone/src/cmd/revad/revad -c storage-oc.toml &
- /drone/src/cmd/revad/revad -c storage-home-owncloud.toml &
- /drone/src/cmd/revad/revad -c storage-oc-owncloud.toml &
- /drone/src/cmd/revad/revad -c storage-publiclink.toml &
- /drone/src/cmd/revad/revad -c ldap-users.toml

Expand Down
48 changes: 48 additions & 0 deletions tests/oc-integration-tests/drone/storage-home-ocis.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This storage-home.toml config file will start a reva service that:
[shared]
jwt_secret = "Pive-Fumkiu4"
gatewaysvc = "localhost:19000"

# - authenticates grpc storage provider requests using the internal jwt token
# - authenticates http upload and download requests requests using basic auth
# - serves the home storage provider on grpc port 12000
# - serves http dataprovider for this storage on port 12001
# - /data - dataprovider: file up and download
#
# The home storage will inject the username into the path and jail users into
# their home directory

[grpc]
address = "0.0.0.0:12000"

# This is a storage provider that grants direct access to the wrapped storage
# TODO same storage id as the /oc/ storage provider
# if we have an id, we can directly go to that storage, no need to wrap paths
# we have a locally running dataprovider
# this is where clients can find it
# the context path wrapper reads tho username from the context and prefixes the relative storage path with it
[grpc.services.storageprovider]
driver = "ocis"
mount_path = "/home"
mount_id = "123e4567-e89b-12d3-a456-426655440000"
expose_data_server = true
data_server_url = "http://localhost:12001/data"
enable_home_creation = true

[grpc.services.storageprovider.drivers.ocis]
datadirectory = "/drone/src/tmp/reva/data"
enable_home = true
redis = "redis:6379"


[http]
address = "0.0.0.0:12001"

[http.services.dataprovider]
driver = "ocis"
temp_folder = "/drone/src/tmp/reva/tmp"

[http.services.dataprovider.drivers.ocis]
datadirectory = "/drone/src/tmp/reva/data"
enable_home = true
redis = "redis:6379"
37 changes: 37 additions & 0 deletions tests/oc-integration-tests/drone/storage-oc-ocis.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This storage.toml config file will start a reva service that:
[shared]
jwt_secret = "Pive-Fumkiu4"
gatewaysvc = "localhost:19000"

# - authenticates grpc storage provider requests using the internal jwt token
# - authenticates http upload and download requests requests using basic auth
# - serves the storage provider on grpc port 11000
# - serves http dataprovider for this storage on port 11001
# - /data - dataprovider: file up and download
[grpc]
address = "0.0.0.0:11000"

# This is a storage provider that grants direct access to the wrapped storage
# we have a locally running dataprovider
[grpc.services.storageprovider]
driver = "ocis"
mount_path = "/oc"
mount_id = "123e4567-e89b-12d3-a456-426655440000"
expose_data_server = true
data_server_url = "http://localhost:11001/data"

[grpc.services.storageprovider.drivers.ocis]
datadirectory = "/drone/src/tmp/reva/data"

This comment has been minimized.

Copy link
@individual-it

individual-it Oct 23, 2020

Contributor

need to be changed to root = "/drone/src/tmp/reva/data"

This comment has been minimized.

Copy link
@phil-davis

phil-davis Oct 23, 2020

Author Contributor

why do the tests pass?

redis = "redis:6379"
userprovidersvc = "localhost:18000"

[http]
address = "0.0.0.0:11001"

[http.services.dataprovider]
driver = "ocis"
temp_folder = "/drone/src/tmp/reva/tmp"

[http.services.dataprovider.drivers.ocis]
datadirectory = "/drone/src/tmp/reva/data"
redis = "redis:6379"

0 comments on commit fd2b257

Please sign in to comment.