Skip to content

Commit

Permalink
[tests-only] Add cs3api validator (#2716)
Browse files Browse the repository at this point in the history
* add cs3api validator

* add admin demo user

* add valiator also on S3NG storage
  • Loading branch information
micbar authored Apr 6, 2022
1 parent 081fe44 commit 315a05a
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 0 deletions.
111 changes: 111 additions & 0 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def main(ctx):
litmusOcisOldWebdav(),
litmusOcisNewWebdav(),
litmusOcisSpacesDav(),
cs3ApiValidatorOcis(),
cs3ApiValidatorS3NG(),
# virtual views don't work on edge at the moment
#virtualViews(),
] + ocisIntegrationTests(6) + s3ngIntegrationTests(12)
Expand Down Expand Up @@ -760,6 +762,115 @@ def litmusOcisSpacesDav():
"depends_on": ["changelog"],
}

def cs3ApiValidatorOcis():
return {
"kind": "pipeline",
"type": "docker",
"name": "cs3api-validator-ocis",
"platform": {
"os": "linux",
"arch": "amd64",
},
"trigger": {
"event": {
"include": [
"pull_request",
"tag",
],
},
},
"steps": [
makeStep("build-ci"),
{
"name": "revad-services",
"image": "registry.cern.ch/docker.io/library/golang:1.17",
"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-users-ocis.toml &",
"/drone/src/cmd/revad/revad -c storage-shares.toml &",
"/drone/src/cmd/revad/revad -c storage-publiclink.toml &",
"/drone/src/cmd/revad/revad -c shares.toml &",
"/drone/src/cmd/revad/revad -c permissions-ocis-ci.toml &",
"/drone/src/cmd/revad/revad -c users.toml",
],
},
{
"name": "sleep-for-revad-start",
"image": "registry.cern.ch/docker.io/library/golang:1.17",
"commands": [
"sleep 5",
],
},
{
"name": "cs3api-validator-ocis",
"image": "owncloud/cs3api-validator:latest",
"commands": [
"/usr/bin/cs3api-validator /var/lib/cs3api-validator --endpoint=revad-services:19000",
],
},
],
"depends_on": ["changelog"],
}

def cs3ApiValidatorS3NG():
return {
"kind": "pipeline",
"type": "docker",
"name": "cs3api-validator-S3NG",
"platform": {
"os": "linux",
"arch": "amd64",
},
"trigger": {
"event": {
"include": [
"pull_request",
"tag",
],
},
},
"steps": [
makeStep("build-ci"),
{
"name": "revad-services",
"image": "registry.cern.ch/docker.io/library/golang:1.17",
"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-users-s3ng.toml &",
"/drone/src/cmd/revad/revad -c storage-shares.toml &",
"/drone/src/cmd/revad/revad -c storage-publiclink.toml &",
"/drone/src/cmd/revad/revad -c shares.toml &",
"/drone/src/cmd/revad/revad -c permissions-ocis-ci.toml &",
"/drone/src/cmd/revad/revad -c users.toml",
],
},
{
"name": "sleep-for-revad-start",
"image": "registry.cern.ch/docker.io/library/golang:1.17",
"commands": [
"sleep 5",
],
},
{
"name": "cs3api-validator-S3NG",
"image": "owncloud/cs3api-validator:latest",
"commands": [
"/usr/bin/cs3api-validator /var/lib/cs3api-validator --endpoint=revad-services:19000",
],
},
],
"services": [
cephService(),
],
"depends_on": ["changelog"],
}

def ocisIntegrationTests(parallelRuns, skipExceptParts = []):
pipelines = []
debugPartsEnabled = (len(skipExceptParts) != 0)
Expand Down
12 changes: 12 additions & 0 deletions tests/oc-integration-tests/drone/users.demo.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
[
{
"id": {
"opaque_id": "ddc2004c-0977-11eb-9d3f-a793888cd0f8",
"idp": "http://localhost:20080",
"type": 1
},
"username": "admin",
"secret": "admin",
"mail": "[email protected]",
"display_name": "Admin",
"groups": ["sailing-lovers", "radium-lovers", "polonium-lovers", "physics-lovers", "quantum-lovers"]
},
{
"id": {
"opaque_id": "4c510ada-c86b-4815-8820-42cdf82c3d51",
Expand Down

0 comments on commit 315a05a

Please sign in to comment.