mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-09-08 19:58:46 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85e63ca252 | ||
|
|
5accb6056b | ||
|
|
4734c57f2b | ||
|
|
fcde95750b | ||
|
|
eab58b8190 | ||
|
|
48e40a385c | ||
|
|
4d511a3a42 | ||
|
|
a53eb44083 | ||
|
|
ea1a1dd5e2 | ||
|
|
ff5bcdee3f | ||
|
|
559706696a | ||
|
|
02aea2e65e | ||
|
|
8c3ef60da1 | ||
|
|
b5b6a4ee26 | ||
|
|
e992f952d3 | ||
|
|
e5105ab33f | ||
|
|
44c51e88ca | ||
|
|
bb028a569f |
No files matched your search
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"alexkrechik.cucumberautocomplete"
|
||||
]
|
||||
}
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"cucumberautocomplete.steps": [
|
||||
"tests/acceptance/bootstrap/*.php"
|
||||
],
|
||||
"cucumberautocomplete.syncfeatures": "tests/acceptance/features/**/*.feature",
|
||||
"cucumberautocomplete.strictGherkinCompletion": false,
|
||||
"cucumberautocomplete.strictGherkinValidation": false,
|
||||
"cucumberautocomplete.customParameters": [
|
||||
{ "parameter": ":string", "value": "\"([^\"]*)\"" },
|
||||
{ "parameter": "'/\\^(.*)\\$/'", "value": "'^$1$$'", "isRegex": true, "flags": "g" },
|
||||
{ "parameter": "\\$\\w+", "value": "(.*)", "isRegex": true, "flags": "g" },
|
||||
{ "parameter": "(?<!\\?):[a-zA-Z_][a-zA-Z0-9_]*", "value": "\"([^\"]*)\"", "isRegex": true, "flags": "g" }
|
||||
],
|
||||
"cucumberautocomplete.gherkinDefinitionPart": "(Given|When|Then|But)\\(",
|
||||
"cucumberautocomplete.pureTextSteps": false
|
||||
}
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
# The test runner source for UI tests
|
||||
WEB_COMMITID=47a1cfb1dbda4479b88e831d089bfa54b1f4bb8d
|
||||
WEB_COMMITID=7bc6f96066e0618c301ee34cb7fe219efd47e3c0
|
||||
WEB_BRANCH=main
|
||||
+38
-46
@@ -375,30 +375,31 @@ config = {
|
||||
"1": {
|
||||
"skip": False,
|
||||
"suites": [
|
||||
"journeys",
|
||||
"smoke",
|
||||
"journeys/",
|
||||
"smoke/",
|
||||
],
|
||||
},
|
||||
"2": {
|
||||
"skip": False,
|
||||
"suites": [
|
||||
"admin-settings",
|
||||
"spaces",
|
||||
"admin-settings/",
|
||||
"spaces/",
|
||||
"rclone-crypt/",
|
||||
],
|
||||
},
|
||||
"3": {
|
||||
"skip": False,
|
||||
"suites": [
|
||||
"shares",
|
||||
"search",
|
||||
"shares/",
|
||||
"search/",
|
||||
],
|
||||
"tikaNeeded": True,
|
||||
},
|
||||
"4": {
|
||||
"skip": False,
|
||||
"suites": [
|
||||
"user-settings",
|
||||
#"fileaction",
|
||||
"user-settings/",
|
||||
"fileaction/",
|
||||
"embed",
|
||||
],
|
||||
},
|
||||
@@ -407,12 +408,12 @@ config = {
|
||||
"testSuites": {
|
||||
"skip": False,
|
||||
"suites": [
|
||||
"smoke",
|
||||
"shares",
|
||||
"search",
|
||||
"journeys",
|
||||
#"file-action",
|
||||
"spaces",
|
||||
"smoke/",
|
||||
"shares/",
|
||||
"search/",
|
||||
"journeys/",
|
||||
"file-action/",
|
||||
"spaces/",
|
||||
],
|
||||
"tikaNeeded": True,
|
||||
},
|
||||
@@ -1546,13 +1547,15 @@ def e2eTestPipeline(ctx):
|
||||
if "[decomposed]" in ctx.build.title.lower():
|
||||
params["storages"] = ["decomposed"]
|
||||
|
||||
e2e_args = "--suites %s" % ",".join(params["suites"]) if params["suites"] else ""
|
||||
e2e_args = " ".join(params["suites"]) if params["suites"] else ""
|
||||
|
||||
if "with-tracing" in ctx.build.title.lower():
|
||||
params["reportTracing"] = True
|
||||
|
||||
for storage in params["storages"]:
|
||||
for watch_fs_enabled in params["enableWatchFs"]:
|
||||
pipeline_name = "test-e2e-%s-%s%s" % (name, storage, "-watchfs" if watch_fs_enabled else "")
|
||||
|
||||
steps = \
|
||||
skipCheckStep(ctx, "e2e-tests") + \
|
||||
evaluateWorkflowStep() + \
|
||||
@@ -1572,24 +1575,23 @@ def e2eTestPipeline(ctx):
|
||||
"image": OC_CI_NODEJS,
|
||||
"environment": {
|
||||
"OC_BASE_URL": OC_DOMAIN,
|
||||
"HEADLESS": True,
|
||||
"RETRY": "1",
|
||||
"WEB_UI_CONFIG_FILE": "%s/%s" % (dirs["base"], dirs["opencloudConfig"]),
|
||||
"LOCAL_UPLOAD_DIR": "/uploads",
|
||||
"PLAYWRIGHT_BROWSERS_PATH": "%s/%s" % (dirs["base"], ".playwright"),
|
||||
"BROWSER": "chromium",
|
||||
"REPORT_TRACING": params["reportTracing"],
|
||||
"SLOW_MO": "300",
|
||||
},
|
||||
"commands": [
|
||||
"cd %s/tests/e2e" % dirs["web"],
|
||||
"bash run-e2e.sh %s" % e2e_args,
|
||||
"pnpm playwright install chromium",
|
||||
"pnpm bddgen",
|
||||
"pnpm playwright test %s --project=chromium" % e2e_args,
|
||||
],
|
||||
}] + \
|
||||
uploadTracingResult(ctx)
|
||||
uploadTestArtifacts(pipeline_name)
|
||||
|
||||
pipeline = {
|
||||
"name": "test-e2e-%s-%s%s" % (name, storage, "-watchfs" if watch_fs_enabled else ""),
|
||||
"name": pipeline_name,
|
||||
"steps": steps,
|
||||
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx) + buildWebCache(ctx)),
|
||||
"when": e2e_trigger,
|
||||
@@ -1608,7 +1610,6 @@ def multiServiceE2ePipeline(ctx):
|
||||
defaults = {
|
||||
"skip": False,
|
||||
"suites": [],
|
||||
"xsuites": [],
|
||||
"tikaNeeded": False,
|
||||
"reportTracing": False,
|
||||
"enableWatchFs": [False],
|
||||
@@ -1692,13 +1693,7 @@ def multiServiceE2ePipeline(ctx):
|
||||
if "[decomposed]" in ctx.build.title.lower():
|
||||
params["storages"] = ["decomposed"]
|
||||
|
||||
e2e_args = ""
|
||||
if params["suites"]:
|
||||
e2e_args = "--suites %s" % ",".join(params["suites"])
|
||||
|
||||
# suites to skip
|
||||
if params["xsuites"]:
|
||||
e2e_args += " --xsuites %s" % ",".join(params["xsuites"])
|
||||
e2e_args = " ".join(params["suites"]) if params["suites"] else ""
|
||||
|
||||
if "with-tracing" in ctx.build.title.lower():
|
||||
params["reportTracing"] = True
|
||||
@@ -1708,6 +1703,8 @@ def multiServiceE2ePipeline(ctx):
|
||||
if watch_fs_enabled:
|
||||
extra_server_environment["STORAGE_USERS_POSIX_WATCH_FS"] = True
|
||||
|
||||
pipeline_name = "test-e2e-multi-service%s" % ("-watchfs" if watch_fs_enabled else "")
|
||||
|
||||
steps = \
|
||||
skipCheckStep(ctx, "e2e-tests") + \
|
||||
evaluateWorkflowStep() + \
|
||||
@@ -1723,21 +1720,20 @@ def multiServiceE2ePipeline(ctx):
|
||||
"image": OC_CI_NODEJS,
|
||||
"environment": {
|
||||
"OC_BASE_URL": OC_DOMAIN,
|
||||
"HEADLESS": True,
|
||||
"RETRY": "1",
|
||||
"REPORT_TRACING": params["reportTracing"],
|
||||
"PLAYWRIGHT_BROWSERS_PATH": "%s/%s" % (dirs["base"], ".playwright"),
|
||||
"BROWSER": "chromium",
|
||||
},
|
||||
"commands": [
|
||||
"cd %s/tests/e2e" % dirs["web"],
|
||||
"bash run-e2e.sh %s" % e2e_args,
|
||||
"pnpm playwright install chromium",
|
||||
"pnpm bddgen",
|
||||
"pnpm playwright test %s --project=chromium" % e2e_args,
|
||||
],
|
||||
}] + \
|
||||
uploadTracingResult(ctx)
|
||||
uploadTestArtifacts(pipeline_name)
|
||||
|
||||
pipeline = {
|
||||
"name": "test-e2e-multi-service%s" % ("-watchfs" if watch_fs_enabled else ""),
|
||||
"name": pipeline_name,
|
||||
"steps": steps,
|
||||
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx) + buildWebCache(ctx)),
|
||||
"when": e2e_trigger,
|
||||
@@ -1749,24 +1745,20 @@ def multiServiceE2ePipeline(ctx):
|
||||
pipelines.append(pipeline)
|
||||
return pipelines
|
||||
|
||||
def uploadTracingResult(ctx):
|
||||
status = ["failure"]
|
||||
if "with-tracing" in ctx.build.title.lower():
|
||||
status = ["failure", "success"]
|
||||
|
||||
def uploadTestArtifacts(pipeline_name):
|
||||
return [{
|
||||
"name": "upload-tracing-result",
|
||||
"name": "upload-test-artifacts",
|
||||
"image": MINIO_MC,
|
||||
"environment": MINIO_MC_ENV,
|
||||
"commands": [
|
||||
"microdnf install -y zip",
|
||||
"mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
|
||||
"mc cp -a %s/reports/e2e/playwright/tracing/* s3/$PUBLIC_BUCKET/web/tracing/$CI_REPO_NAME/$CI_PIPELINE_NUMBER/" % dirs["web"],
|
||||
"cd %s/reports/e2e/playwright/tracing/" % dirs["web"],
|
||||
'echo "To see the trace, please open the following link in the console"',
|
||||
'for f in *.zip; do echo "npx playwright show-trace $MC_HOST/$PUBLIC_BUCKET/web/tracing/$CI_REPO_NAME/$CI_PIPELINE_NUMBER/$f \n"; done',
|
||||
"cd %s/tests/e2e/playwright-report && zip -r /tmp/playwright-report.zip ." % dirs["web"],
|
||||
"mc cp /tmp/playwright-report.zip s3/$PUBLIC_BUCKET/web/artifacts/$CI_REPO_NAME/$CI_PIPELINE_NUMBER/%s/playwright-report.zip" % pipeline_name,
|
||||
'printf "=== HTML Report ===\ncurl -O $MC_HOST/$PUBLIC_BUCKET/web/artifacts/$CI_REPO_NAME/$CI_PIPELINE_NUMBER/%s/playwright-report.zip && npx playwright show-report playwright-report.zip\n"' % pipeline_name,
|
||||
],
|
||||
"when": {
|
||||
"status": status,
|
||||
"status": ["failure", "success"],
|
||||
},
|
||||
}]
|
||||
|
||||
|
||||
@@ -1,5 +1,83 @@
|
||||
# Changelog
|
||||
|
||||
## [7.3.0](https://github.com/opencloud-eu/opencloud/releases/tag/v7.3.0) - 2026-07-14
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
- fix(proxy): honor access token cache ttl [[#3056](https://github.com/opencloud-eu/opencloud/pull/3056)]
|
||||
- chore(idp): update axios [[#3094](https://github.com/opencloud-eu/opencloud/pull/3094)]
|
||||
- fix: make the collaboration service events optional [[#3001](https://github.com/opencloud-eu/opencloud/pull/3001)]
|
||||
- Revert "fix: disallow thumbnails for tiff and jpeg2000 images" [[#2973](https://github.com/opencloud-eu/opencloud/pull/2973)]
|
||||
- bump reva [[#2950](https://github.com/opencloud-eu/opencloud/pull/2950)]
|
||||
- change error level for trashing items interaction with search [[#2951](https://github.com/opencloud-eu/opencloud/pull/2951)]
|
||||
- fix: Send SSE events for SpaceEnabled/Disabled to affected users [[#2871](https://github.com/opencloud-eu/opencloud/pull/2871)]
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
- update collaboration readme [[#3076](https://github.com/opencloud-eu/opencloud/pull/3076)]
|
||||
- fix: fix typo in proxy service documentation [[#3089](https://github.com/opencloud-eu/opencloud/pull/3089)]
|
||||
- roling release template [[#2972](https://github.com/opencloud-eu/opencloud/pull/2972)]
|
||||
- enhance: fix typos in webfinger service description [[#2958](https://github.com/opencloud-eu/opencloud/pull/2958)]
|
||||
|
||||
### ✅ Tests
|
||||
|
||||
- [full-ci] gherkin steps refactoring. cleaning code [[#3100](https://github.com/opencloud-eu/opencloud/pull/3100)]
|
||||
- [decomposed] more cli command tests [[#3087](https://github.com/opencloud-eu/opencloud/pull/3087)]
|
||||
- test(apiSpaces): a space admin can delete a space with no manager [[#3040](https://github.com/opencloud-eu/opencloud/pull/3040)]
|
||||
- Update tests for opencloud-eu/reva#655 [[#2889](https://github.com/opencloud-eu/opencloud/pull/2889)]
|
||||
- api-test: deleting space [[#2970](https://github.com/opencloud-eu/opencloud/pull/2970)]
|
||||
|
||||
### 📈 Enhancement
|
||||
|
||||
- feat: add disableSponsorLink web config option [[#3093](https://github.com/opencloud-eu/opencloud/pull/3093)]
|
||||
- feat(graph): add MS Graph colon-syntax path lookup middleware [[#2688](https://github.com/opencloud-eu/opencloud/pull/2688)]
|
||||
- feat: adjust theme chrome colors and logos [[#2599](https://github.com/opencloud-eu/opencloud/pull/2599)]
|
||||
- add tls support for all nats connections [[#2063](https://github.com/opencloud-eu/opencloud/pull/2063)]
|
||||
- feat: add more roles [[#2928](https://github.com/opencloud-eu/opencloud/pull/2928)]
|
||||
- next to main [[#2924](https://github.com/opencloud-eu/opencloud/pull/2924)]
|
||||
- feat: add core apps env variable to override the default core apps [[#2930](https://github.com/opencloud-eu/opencloud/pull/2930)]
|
||||
|
||||
### 📦️ Dependencies
|
||||
|
||||
- build(deps): bump golang.org/x/image from 0.43.0 to 0.44.0 [[#3112](https://github.com/opencloud-eu/opencloud/pull/3112)]
|
||||
- build(deps): bump golang.org/x/text from 0.39.0 to 0.40.0 [[#3101](https://github.com/opencloud-eu/opencloud/pull/3101)]
|
||||
- [full-ci] chore: bump web to v7.2.0 [[#3121](https://github.com/opencloud-eu/opencloud/pull/3121)]
|
||||
- build(deps): bump golang.org/x/term from 0.44.0 to 0.45.0 [[#3103](https://github.com/opencloud-eu/opencloud/pull/3103)]
|
||||
- build(deps): bump github.com/coreos/go-oidc/v3 from 3.19.0 to 3.20.0 [[#3102](https://github.com/opencloud-eu/opencloud/pull/3102)]
|
||||
- build(deps): bump golang.org/x/text from 0.38.0 to 0.39.0 [[#3085](https://github.com/opencloud-eu/opencloud/pull/3085)]
|
||||
- build(deps): bump github.com/go-chi/chi/v5 from 5.3.0 to 5.3.1 [[#3073](https://github.com/opencloud-eu/opencloud/pull/3073)]
|
||||
- build(deps): bump github.com/nats-io/nats-server/v2 from 2.14.2 to 2.14.3 [[#3063](https://github.com/opencloud-eu/opencloud/pull/3063)]
|
||||
- build(deps): bump github.com/gookit/config/v2 from 2.2.8 to 2.2.9 [[#3075](https://github.com/opencloud-eu/opencloud/pull/3075)]
|
||||
- build(deps): bump github.com/open-policy-agent/opa from 1.18.1 to 1.18.2 [[#3061](https://github.com/opencloud-eu/opencloud/pull/3061)]
|
||||
- build(deps): bump github.com/kovidgoyal/imaging from 1.8.21 to 1.8.22 [[#3060](https://github.com/opencloud-eu/opencloud/pull/3060)]
|
||||
- build(deps): bump github.com/libregraph/lico from 0.66.0 to 0.67.0 [[#3028](https://github.com/opencloud-eu/opencloud/pull/3028)]
|
||||
- chore: bump web to v7.2.0-beta.3 [[#2953](https://github.com/opencloud-eu/opencloud/pull/2953)]
|
||||
- chore: bump reva to latest main [[#2943](https://github.com/opencloud-eu/opencloud/pull/2943)]
|
||||
|
||||
## [7.2.0](https://github.com/opencloud-eu/opencloud/releases/tag/v7.2.0) - 2026-06-24
|
||||
|
||||
### ❤️ Thanks to all contributors! ❤️
|
||||
|
||||
@Heiko-Pohl, @JammingBen, @ScharfViktor, @aduffeck, @butonic, @dragonchaser, @kulmann, @rhafer
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
- [stable-7.2] Backport fixes from main [[#2999](https://github.com/opencloud-eu/opencloud/pull/2999)]
|
||||
- fix(idp): aarch64 build [[#2906](https://github.com/opencloud-eu/opencloud/pull/2906)]
|
||||
- use ldap instead of ldaps internally [[#2880](https://github.com/opencloud-eu/opencloud/pull/2880)]
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
- Rename role_name from "guest" to "user-light" [[#2912](https://github.com/opencloud-eu/opencloud/pull/2912)]
|
||||
|
||||
### 📦️ Dependencies
|
||||
|
||||
- [full-ci] chore: bump web to v7.1.2 [[#3012](https://github.com/opencloud-eu/opencloud/pull/3012)]
|
||||
- [full-ci] chore: bump web to v7.1.1 [[#2998](https://github.com/opencloud-eu/opencloud/pull/2998)]
|
||||
- bump reva to latest main [[#2922](https://github.com/opencloud-eu/opencloud/pull/2922)]
|
||||
- build(deps-dev): bump webpack-manifest-plugin from 5.0.0 to 6.0.1 in /services/idp [[#2884](https://github.com/opencloud-eu/opencloud/pull/2884)]
|
||||
- build(deps): bump axios from 1.16.0 to 1.16.1 in /services/idp [[#2883](https://github.com/opencloud-eu/opencloud/pull/2883)]
|
||||
|
||||
## [7.1.0](https://github.com/opencloud-eu/opencloud/releases/tag/v7.1.0) - 2026-06-02
|
||||
|
||||
### ❤️ Thanks to all contributors! ❤️
|
||||
|
||||
@@ -107,6 +107,7 @@ help:
|
||||
@echo -e "${GREEN}Tools for linting gherkin feature files:\n${RESET}"
|
||||
@echo -e "\tmake test-gherkin-lint\t\t${BLUE}run lint checks on Gherkin feature files${RESET}"
|
||||
@echo -e "\tmake test-gherkin-lint-fix\t${BLUE}apply lint fixes to gherkin feature files${RESET}"
|
||||
@echo -e "\tmake find-unused-steps\t\t${BLUE}list Behat step definitions unused by any .feature file${RESET}"
|
||||
@echo
|
||||
|
||||
.PHONY: clean-tests
|
||||
@@ -228,6 +229,10 @@ test-gherkin-lint:
|
||||
test-gherkin-lint-fix:
|
||||
gherlint --fix tests/acceptance/features -c tests/acceptance/config/.gherlintrc.json
|
||||
|
||||
.PHONY: find-unused-steps
|
||||
find-unused-steps: vendor-bin/behat/vendor
|
||||
tests/acceptance/scripts/find-unused-steps.sh
|
||||
|
||||
.PHONY: bingo-update
|
||||
bingo-update: $(BINGO)
|
||||
$(BINGO) get -l -v -t 20
|
||||
|
||||
@@ -13,7 +13,7 @@ require (
|
||||
github.com/beevik/etree v1.6.0
|
||||
github.com/blevesearch/bleve/v2 v2.6.0
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/coreos/go-oidc/v3 v3.19.0
|
||||
github.com/coreos/go-oidc/v3 v3.20.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20260424072047-8d9ef7076ae9
|
||||
github.com/davidbyttow/govips/v2 v2.18.0
|
||||
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
|
||||
@@ -64,7 +64,7 @@ require (
|
||||
github.com/open-policy-agent/opa v1.18.2
|
||||
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
|
||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d
|
||||
github.com/opencloud-eu/reva/v2 v2.46.4-0.20260625152426-8cff2a7032ec
|
||||
github.com/opencloud-eu/reva/v2 v2.47.0
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.6.0
|
||||
github.com/orcaman/concurrent-map v1.0.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
@@ -104,12 +104,12 @@ require (
|
||||
go.opentelemetry.io/otel/trace v1.44.0
|
||||
golang.org/x/crypto v0.53.0
|
||||
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
|
||||
golang.org/x/image v0.43.0
|
||||
golang.org/x/image v0.44.0
|
||||
golang.org/x/net v0.56.0
|
||||
golang.org/x/oauth2 v0.36.0
|
||||
golang.org/x/sync v0.21.0
|
||||
golang.org/x/term v0.44.0
|
||||
golang.org/x/text v0.39.0
|
||||
golang.org/x/sync v0.22.0
|
||||
golang.org/x/term v0.45.0
|
||||
golang.org/x/text v0.40.0
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa
|
||||
google.golang.org/grpc v1.82.0
|
||||
google.golang.org/protobuf v1.36.11
|
||||
@@ -126,7 +126,7 @@ require (
|
||||
github.com/Azure/go-ntlmssp v0.1.1 // indirect
|
||||
github.com/BurntSushi/toml v1.6.0 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.4.0 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.5.0 // indirect
|
||||
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
|
||||
github.com/Microsoft/go-winio v0.6.2 // indirect
|
||||
github.com/ProtonMail/go-crypto v1.1.6 // indirect
|
||||
@@ -166,8 +166,8 @@ require (
|
||||
github.com/ceph/go-ceph v0.40.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73 // indirect
|
||||
github.com/clipperhouse/displaywidth v0.10.0 // indirect
|
||||
github.com/clipperhouse/uax29/v2 v2.6.0 // indirect
|
||||
github.com/clipperhouse/displaywidth v0.11.0 // indirect
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
|
||||
github.com/cloudflare/circl v1.6.3 // indirect
|
||||
github.com/containerd/errdefs v1.0.0 // indirect
|
||||
github.com/containerd/errdefs/pkg v0.3.0 // indirect
|
||||
@@ -189,7 +189,7 @@ require (
|
||||
github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/distribution/reference v0.6.0 // indirect
|
||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
github.com/dlclark/regexp2 v1.12.0 // indirect
|
||||
github.com/docker/go-connections v0.6.0 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
@@ -198,7 +198,7 @@ require (
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/emvi/iso-639-1 v1.1.1 // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.5.0 // indirect
|
||||
github.com/fatih/color v1.18.0 // indirect
|
||||
github.com/fatih/color v1.19.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.10.1 // indirect
|
||||
github.com/gdexlab/go-render v1.0.1 // indirect
|
||||
@@ -207,7 +207,6 @@ require (
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.9.0 // indirect
|
||||
github.com/go-git/go-git/v5 v5.19.1 // indirect
|
||||
github.com/go-ini/ini v1.67.0 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
|
||||
github.com/go-kit/log v0.2.1 // indirect
|
||||
github.com/go-logfmt/logfmt v0.5.1 // indirect
|
||||
@@ -277,7 +276,7 @@ require (
|
||||
github.com/mattermost/xml-roundtrip-validator v0.1.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.19 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.23 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.42 // indirect
|
||||
github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b // indirect
|
||||
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 // indirect
|
||||
@@ -286,7 +285,7 @@ require (
|
||||
github.com/minio/crc64nvme v1.1.1 // indirect
|
||||
github.com/minio/highwayhash v1.0.4 // indirect
|
||||
github.com/minio/md5-simd v1.1.2 // indirect
|
||||
github.com/minio/minio-go/v7 v7.1.0 // indirect
|
||||
github.com/minio/minio-go/v7 v7.2.1 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||
github.com/moby/docker-image-spec v1.3.1 // indirect
|
||||
@@ -317,14 +316,14 @@ require (
|
||||
github.com/pablodz/inotifywaitgo v0.0.12 // indirect
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
|
||||
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.3.1 // indirect
|
||||
github.com/philhofer/fwd v1.2.0 // indirect
|
||||
github.com/pierrec/lz4/v4 v4.1.15 // indirect
|
||||
github.com/pierrec/lz4/v4 v4.1.26 // indirect
|
||||
github.com/pjbgf/sha1cd v0.6.0 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
|
||||
github.com/pquerna/cachecontrol v0.2.0 // indirect
|
||||
github.com/prometheus/alertmanager v0.31.1 // indirect
|
||||
github.com/prometheus/alertmanager v0.33.1 // indirect
|
||||
github.com/prometheus/client_model v0.6.2 // indirect
|
||||
github.com/prometheus/common v0.67.5 // indirect
|
||||
github.com/prometheus/procfs v0.20.1 // indirect
|
||||
@@ -339,7 +338,7 @@ require (
|
||||
github.com/samber/slog-common v0.21.0 // indirect
|
||||
github.com/samber/slog-zerolog/v2 v2.9.2 // indirect
|
||||
github.com/segmentio/asm v1.2.1 // indirect
|
||||
github.com/segmentio/kafka-go v0.4.50 // indirect
|
||||
github.com/segmentio/kafka-go v0.4.51 // indirect
|
||||
github.com/segmentio/ksuid v1.0.4 // indirect
|
||||
github.com/sercand/kuberesolver/v5 v5.1.1 // indirect
|
||||
github.com/sergi/go-diff v1.4.0 // indirect
|
||||
@@ -347,8 +346,6 @@ require (
|
||||
github.com/sethvargo/go-password v0.3.1 // indirect
|
||||
github.com/shamaton/msgpack/v2 v2.4.1 // indirect
|
||||
github.com/shirou/gopsutil/v4 v4.26.5 // indirect
|
||||
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
|
||||
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 // indirect
|
||||
github.com/skeema/knownhosts v1.3.1 // indirect
|
||||
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
|
||||
github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784 // indirect
|
||||
@@ -376,9 +373,9 @@ require (
|
||||
github.com/yashtewari/glob-intersection v0.2.0 // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
||||
github.com/zeebo/xxh3 v1.1.0 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.6.11 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.11 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.6.11 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.6.13 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.13 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.6.13 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 // indirect
|
||||
@@ -389,12 +386,13 @@ require (
|
||||
go.yaml.in/yaml/v2 v2.4.4 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/mod v0.37.0 // indirect
|
||||
golang.org/x/sys v0.46.0 // indirect
|
||||
golang.org/x/sys v0.47.0 // indirect
|
||||
golang.org/x/time v0.15.0 // indirect
|
||||
golang.org/x/tools v0.47.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect
|
||||
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
|
||||
gopkg.in/ini.v1 v1.67.3 // indirect
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
sigs.k8s.io/yaml v1.6.0 // indirect
|
||||
|
||||
@@ -76,8 +76,8 @@ github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJ
|
||||
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
|
||||
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
|
||||
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
|
||||
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
||||
github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE=
|
||||
github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
||||
github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60=
|
||||
github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
|
||||
github.com/MicahParks/keyfunc/v2 v2.1.0 h1:6ZXKb9Rp6qp1bDbJefnG7cTH8yMN1IC/4nf+GVjO99k=
|
||||
@@ -220,10 +220,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/clipperhouse/displaywidth v0.10.0 h1:GhBG8WuerxjFQQYeuZAeVTuyxuX+UraiZGD4HJQ3Y8g=
|
||||
github.com/clipperhouse/displaywidth v0.10.0/go.mod h1:XqJajYsaiEwkxOj4bowCTMcT1SgvHo9flfF3jQasdbs=
|
||||
github.com/clipperhouse/uax29/v2 v2.6.0 h1:z0cDbUV+aPASdFb2/ndFnS9ts/WNXgTNNGFoKXuhpos=
|
||||
github.com/clipperhouse/uax29/v2 v2.6.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g=
|
||||
github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8=
|
||||
github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0=
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=
|
||||
github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
|
||||
github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8=
|
||||
github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=
|
||||
github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304=
|
||||
@@ -238,8 +238,8 @@ github.com/containerd/platforms v1.0.0-rc.2 h1:0SPgaNZPVWGEi4grZdV8VRYQn78y+nm6a
|
||||
github.com/containerd/platforms v1.0.0-rc.2/go.mod h1:J71L7B+aiM5SdIEqmd9wp6THLVRzJGXfNuWCZCllLA4=
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-oidc/v3 v3.19.0 h1:F/xyOi3x1UnG1U27YVnM1N6bHiL1K2upi6U/0qr8r+I=
|
||||
github.com/coreos/go-oidc/v3 v3.19.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
|
||||
github.com/coreos/go-oidc/v3 v3.20.0 h1:EtE0WIBHk03N+DqGkY4+UONzzZHk7amKt6IyNd7OsZE=
|
||||
github.com/coreos/go-oidc/v3 v3.20.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
|
||||
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
|
||||
@@ -300,8 +300,8 @@ github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8/go.mod h1:apkPC/CR3s48
|
||||
github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
|
||||
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
|
||||
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
|
||||
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8=
|
||||
github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
|
||||
github.com/dnsimple/dnsimple-go v0.63.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg=
|
||||
github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94=
|
||||
@@ -334,8 +334,8 @@ github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2Vvl
|
||||
github.com/exoscale/egoscale v0.46.0/go.mod h1:mpEXBpROAa/2i5GC0r33rfxG+TxSEka11g1PIXt9+zc=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
||||
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
||||
github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w=
|
||||
github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
@@ -390,8 +390,6 @@ github.com/go-git/go-git/v5 v5.19.1/go.mod h1:Pb1v0c7/g8aGQJwx9Us09W85yGoyvSwuhE
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
|
||||
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
|
||||
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
|
||||
github.com/go-jose/go-jose/v3 v3.0.5 h1:BLLJWbC4nMZOfuPVxoZIxeYsn6Nl2r1fITaJ78UQlVQ=
|
||||
github.com/go-jose/go-jose/v3 v3.0.5/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
|
||||
@@ -816,8 +814,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
|
||||
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw=
|
||||
github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/mattn/go-sqlite3 v1.14.42 h1:MigqEP4ZmHw3aIdIT7T+9TLa90Z6smwcthx+Azv4Cgo=
|
||||
github.com/mattn/go-sqlite3 v1.14.42/go.mod h1:pjEuOr8IwzLJP2MfGeTb0A35jauH+C2kbHKBr7yXKVQ=
|
||||
github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE=
|
||||
@@ -841,8 +839,8 @@ github.com/minio/highwayhash v1.0.4 h1:asJizugGgchQod2ja9NJlGOWq4s7KsAWr5XUc9Clg
|
||||
github.com/minio/highwayhash v1.0.4/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ=
|
||||
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
||||
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
||||
github.com/minio/minio-go/v7 v7.1.0 h1:QEt5IStDpxgGjEdtOgpiZ5QhmSl3ax7qy61vi2SwHO8=
|
||||
github.com/minio/minio-go/v7 v7.1.0/go.mod h1:Dm7WS1AgLmBa0NcQD6SeJnJf+K/EUW3GR7Ks6olB3OA=
|
||||
github.com/minio/minio-go/v7 v7.2.1 h1:PfBfwvKB/MmqyN8Vb1G9voWisaM9OrLv+WwOvMwS9Dw=
|
||||
github.com/minio/minio-go/v7 v7.2.1/go.mod h1:EU9hENAStx/xXduNdrGO5e4X5vk19NtgB+RIPjZO8o0=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
||||
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
|
||||
@@ -946,8 +944,8 @@ github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 h1:W1ms+l
|
||||
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89/go.mod h1:vigJkNss1N2QEceCuNw/ullDehncuJNFB6mEnzfq9UI=
|
||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d h1:JcqGDiyrcaQwVyV861TUyQgO7uEmsjkhfm7aQd84dOw=
|
||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
|
||||
github.com/opencloud-eu/reva/v2 v2.46.4-0.20260625152426-8cff2a7032ec h1:kL9P87cVpe8GKvo5vzLpJstpiVXFvkZn2+Dco53nfuM=
|
||||
github.com/opencloud-eu/reva/v2 v2.46.4-0.20260625152426-8cff2a7032ec/go.mod h1:l4CG5u8tdWZj6IyavXO9xDdnNTV85oaFudGwEDPvsnk=
|
||||
github.com/opencloud-eu/reva/v2 v2.47.0 h1:bYul45qS8GmmN9PKplSZ78ZTZ6A+9xp/FfogqFVud18=
|
||||
github.com/opencloud-eu/reva/v2 v2.47.0/go.mod h1:zdpEKIMDT14w+MGUOWAi+rh+PAZBPUlb7AtIGFWx7Ds=
|
||||
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4 h1:l2oB/RctH+t8r7QBj5p8thfEHCM/jF35aAY3WQ3hADI=
|
||||
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
@@ -975,15 +973,15 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2D
|
||||
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
|
||||
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
|
||||
github.com/pelletier/go-toml/v2 v2.3.1 h1:MYEvvGnQjeNkRF1qUuGolNtNExTDwct51yp7olPtrEc=
|
||||
github.com/pelletier/go-toml/v2 v2.3.1/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
|
||||
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI=
|
||||
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
|
||||
github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
|
||||
github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0=
|
||||
github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
|
||||
github.com/pierrec/lz4/v4 v4.1.26 h1:GrpZw1gZttORinvzBdXPUXATeqlJjqUG/D87TKMnhjY=
|
||||
github.com/pierrec/lz4/v4 v4.1.26/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4=
|
||||
github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo=
|
||||
github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I=
|
||||
github.com/pjbgf/sha1cd v0.6.0 h1:3WJ8Wz8gvDz29quX1OcEmkAlUg9diU4GxJHqs0/XiwU=
|
||||
@@ -1005,8 +1003,8 @@ github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:Om
|
||||
github.com/pquerna/cachecontrol v0.2.0 h1:vBXSNuE5MYP9IJ5kjsdo8uq+w41jSPgvba2DEnkRx9k=
|
||||
github.com/pquerna/cachecontrol v0.2.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI=
|
||||
github.com/pquerna/otp v1.3.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
|
||||
github.com/prometheus/alertmanager v0.31.1 h1:eAmIC42lzbWslHkMt693T36qdxfyZULswiHr681YS3Q=
|
||||
github.com/prometheus/alertmanager v0.31.1/go.mod h1:zWPQwhbLt2ybee8rL921UONeQ59Oncash+m/hGP17tU=
|
||||
github.com/prometheus/alertmanager v0.33.1 h1:PJHGvTdb8Q0ZEpJnWff120WxB2kxIScLa707AaIudTo=
|
||||
github.com/prometheus/alertmanager v0.33.1/go.mod h1:V06Uc8EZ5X5wLOJRGhtXx+EE2LgrinFIADbKWMVm1RY=
|
||||
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
||||
@@ -1096,8 +1094,8 @@ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f/
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
||||
github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0=
|
||||
github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
|
||||
github.com/segmentio/kafka-go v0.4.50 h1:mcyC3tT5WeyWzrFbd6O374t+hmcu1NKt2Pu1L3QaXmc=
|
||||
github.com/segmentio/kafka-go v0.4.50/go.mod h1:Y1gn60kzLEEaW28YshXyk2+VCUKbJ3Qr6DrnT3i4+9E=
|
||||
github.com/segmentio/kafka-go v0.4.51 h1:JgDPPG75tC1rWIS2Me6MwcvXJ6f49UQ4HjAOef71Hno=
|
||||
github.com/segmentio/kafka-go v0.4.51/go.mod h1:Y1gn60kzLEEaW28YshXyk2+VCUKbJ3Qr6DrnT3i4+9E=
|
||||
github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=
|
||||
github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE=
|
||||
github.com/sercand/kuberesolver/v5 v5.1.1 h1:CYH+d67G0sGBj7q5wLK61yzqJJ8gLLC8aeprPTHb6yY=
|
||||
@@ -1114,11 +1112,7 @@ github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKl
|
||||
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||
github.com/shirou/gopsutil/v4 v4.26.5 h1:RPcBXkpz7kOj9PqGFQOlBPZHsyaPvPVQc098y9RmCNM=
|
||||
github.com/shirou/gopsutil/v4 v4.26.5/go.mod h1:LZ6ewCSkBqUpvSOf+LsTGnRinC6iaNUNMGBtDkJBaLQ=
|
||||
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c h1:aqg5Vm5dwtvL+YgDpBcK1ITf3o96N/K7/wsRXQnUTEs=
|
||||
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c/go.mod h1:owqhoLW1qZoYLZzLnBw+QkPP9WZnjlSWihhxAJC1+/M=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 h1:OfRzdxCzDhp+rsKWXuOO2I/quKMJ/+TQwVbIP/gltZg=
|
||||
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92/go.mod h1:7/OT02F6S6I7v6WXb+IjhMuZEYfH/RJ5RwEWnEo5BMg=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
@@ -1167,6 +1161,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
||||
github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=
|
||||
github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
@@ -1179,6 +1174,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc=
|
||||
@@ -1280,12 +1276,12 @@ github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.5.0 h1:S7GAl7Fxv12yohbwFfIbQCGDWbQbtDGPET4P/bD4lxU=
|
||||
go.etcd.io/bbolt v1.5.0/go.mod h1:mkltfYE5aUHQxUct9N9V+Kp7aSjFqjgrhcXIS70Lrdk=
|
||||
go.etcd.io/etcd/api/v3 v3.6.11 h1:XFGTgrJ8nak3kB4NgMG8t7NT+lEeuuvKQAqUHKVgkWQ=
|
||||
go.etcd.io/etcd/api/v3 v3.6.11/go.mod h1:HYfTh0jyh+uFgp6gMbxJteIDYY97yMuYz85Rnw6Gy9o=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.11 h1:e41mp315Yn3QMGPmEzCyLsMINgJXTY/dX8kM++1csxU=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.11/go.mod h1:DysuMe/inqRyC/1tjRR6hReH/VV9Lufs27YKSKBWWJg=
|
||||
go.etcd.io/etcd/client/v3 v3.6.11 h1:LAByD96VmmeuairkvdAcE0RZnrmGz/q3ceeWePo9bwc=
|
||||
go.etcd.io/etcd/client/v3 v3.6.11/go.mod h1:vOTDMCo+fGPEClJqcFEFSqZ+8e7WKV7AyqJjX//HR2w=
|
||||
go.etcd.io/etcd/api/v3 v3.6.13 h1:AvHPZv15LYEe7tZDyFglv7xnbiuF6GMZpZqKpIzXTt0=
|
||||
go.etcd.io/etcd/api/v3 v3.6.13/go.mod h1:X9+3gaKwzjlOxzo6TZ2u3b7HcHBcAL+Ph7EBPjI/VWk=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.13 h1:7QeMOisYByx8dBA7/CKcwCaPWfjb5C0xpmrIov/8WyY=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.13/go.mod h1:Dn2zUBOCu/6xYcd6iAjB7LgoY16OTQjDZfWHLwvuQj4=
|
||||
go.etcd.io/etcd/client/v3 v3.6.13 h1:0E+9ZYGpMsi9KlOJVoCdONh9PUDawKDTy5mSNY8wOEI=
|
||||
go.etcd.io/etcd/client/v3 v3.6.13/go.mod h1:rtVI3vwobljb8xlTGcp1Yhz7hBIuBWULXwB848kqJGw=
|
||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
@@ -1376,8 +1372,8 @@ golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJk
|
||||
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.43.0 h1:FLxcP4ec2350nTfOC8ysKtqYSIFbk/QGjw1ZHNP4tsY=
|
||||
golang.org/x/image v0.43.0/go.mod h1:rrpelvGFt+kLPAjPM4HeWPgrl0FtafueU//e5N0qk/Q=
|
||||
golang.org/x/image v0.44.0 h1:+tDekMZED9+LrtB3G5xzRggpVh9CARjZqROla3R3R+I=
|
||||
golang.org/x/image v0.44.0/go.mod h1:V8K3KE9KKKE+pLpQDOeN18w9oacNSvy1tDOirTu4xtY=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
@@ -1476,8 +1472,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
|
||||
golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
|
||||
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -1558,8 +1554,8 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
|
||||
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
||||
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
@@ -1568,8 +1564,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
|
||||
golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc=
|
||||
golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y=
|
||||
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
|
||||
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -1582,8 +1578,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.39.0 h1:UbZz4pLOvn600D6Oh6GGEI6VAmndrEBLv8/6BEXzyus=
|
||||
golang.org/x/text v0.39.0/go.mod h1:3UwRclnC2g0TU9x8PZiyfOajCd1zaUNHF9cvqcQZ+ZM=
|
||||
golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
|
||||
golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -1646,8 +1642,6 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.47.0 h1:7Kn5x/d1svx/PzryTsqeoZN4TZwqeH5pGWjefhLi/1Q=
|
||||
golang.org/x/tools v0.47.0/go.mod h1:dFHnyTvFWY212G+h7ZY4Vsp/K3U4/7W9TyVaAul8uCA=
|
||||
golang.org/x/tools/godoc v0.1.0-deprecated h1:o+aZ1BOj6Hsx/GBdJO/s815sqftjSnrZZwyYTHODvtk=
|
||||
golang.org/x/tools/godoc v0.1.0-deprecated/go.mod h1:qM63CriJ961IHWmnWa9CjZnBndniPt4a3CK0PVB9bIg=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -1764,6 +1758,8 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.67.3 h1:iM9Lhz5MRSGhHVGGwCuzG9KO8PoirCXj/m/qTmOJJQw=
|
||||
gopkg.in/ini.v1 v1.67.3/go.mod h1:x/cyOwCgZqOkJoDIJ3c1KNHMo10+nLGAhh+kn3Zizss=
|
||||
gopkg.in/ns1/ns1-go.v2 v2.4.4/go.mod h1:GMnKY+ZuoJ+lVLL+78uSTjwTz2jMazq6AfGKQOYhsPk=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
|
||||
@@ -86,5 +86,6 @@
|
||||
<property name="lineLimit" value="120" />
|
||||
<property name="absoluteLineLimit" value="120" />
|
||||
</properties>
|
||||
<exclude-pattern>*/tests/acceptance/bootstrap/*</exclude-pattern>
|
||||
</rule>
|
||||
</ruleset>
|
||||
@@ -56,9 +56,9 @@ type Cache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"auth_username" env:"OC_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"auth_password" env:"OC_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided OC_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided OC_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
|
||||
// Commons holds configuration that are common to all extensions. Each extension can then decide whether
|
||||
|
||||
@@ -34,7 +34,7 @@ var (
|
||||
// LatestTag is the latest released version plus the dev meta version.
|
||||
// Will be overwritten by the release pipeline
|
||||
// Needs a manual change for every tagged release
|
||||
LatestTag = "7.1.0+dev"
|
||||
LatestTag = "7.3.0+dev"
|
||||
|
||||
// Date indicates the build date.
|
||||
// This has been removed, it looks like you can only replace static strings with recent go versions
|
||||
|
||||
@@ -56,9 +56,9 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OC_PERSISTENT_STORE_TTL;ACTIVITYLOG_STORE_TTL" desc:"Time to live for events in the store. See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_PERSISTENT_STORE_AUTH_USERNAME;ACTIVITYLOG_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_PERSISTENT_STORE_AUTH_PASSWORD;ACTIVITYLOG_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;ACTIVITYLOG_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;ACTIVITYLOG_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;ACTIVITYLOG_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided ACTIVITYLOG_STORE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;ACTIVITYLOG_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;ACTIVITYLOG_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;ACTIVITYLOG_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided ACTIVITYLOG_STORE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
|
||||
// ServiceAccount is the configuration for the used service account
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The collaboration service connects opencloud with document servers such as Collabora, ONLYOFFICE or Microsoft using the WOPI protocol.
|
||||
|
||||
Since this service requires an external document server, it won't start by default when using `opencloud server`. You must start it manually with the `opencloud collaboration server` command.
|
||||
Since this service requires an external document server, it is not enabled by default. You need to add it to `OC_RUN_SERVICES`, `OC_ADD_RUN_SERVICES` or start it in a separate process with the `opencloud collaboration server` command.
|
||||
|
||||
Because the collaboration service needs to be started manually, the following prerequisite applies: On collaboration service startup, particular environment variables are required to be populated. If environment variables have a default like the `MICRO_REGISTRY_ADDRESS`, the default will be used, if not set otherwise. Use for all others the instance values as defined. If these environment variables are not provided or misconfigured, the collaboration service will not start up.
|
||||
|
||||
@@ -14,9 +14,8 @@ Required environment variables:
|
||||
|
||||
## Requirements
|
||||
|
||||
The collaboration service requires the target document server (ONLYOFFICE, Collabora, etc.) to be up and running. Additionally, some OpenCloud services are also required to be running in order to register the GRPC service for the `open in app` action in the webUI. The following internal and external services need to be available:
|
||||
The collaboration periodically checks the target document server (ONLYOFFICE, Collabora, etc.) to update the available edit options. Additionally, some OpenCloud services are required to be running in order to register the GRPC service for the `open in app` action in the webUI. The following internal and external services need to be available:
|
||||
|
||||
* External document server.
|
||||
* The gateway service.
|
||||
* The app-registry service.
|
||||
|
||||
|
||||
@@ -29,5 +29,5 @@ type Config struct {
|
||||
|
||||
Context context.Context `yaml:"-"`
|
||||
|
||||
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OC_MACHINE_AUTH_API_KEY;COLLABORATION_MACHINE_AUTH_API_KEY" desc:"The machine auth API key used to validate internal requests necessary to access resources from other services." introductionVersion:"%%NEXT%%"`
|
||||
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OC_MACHINE_AUTH_API_KEY;COLLABORATION_MACHINE_AUTH_API_KEY" desc:"The machine auth API key used to validate internal requests necessary to access resources from other services." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -2,11 +2,11 @@ package config
|
||||
|
||||
// Events combines the configuration options for the event bus.
|
||||
type Events struct {
|
||||
Endpoint string `yaml:"endpoint" env:"OC_EVENTS_ENDPOINT;COLLABORATION_EVENTS_ENDPOINT" desc:"The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture." introductionVersion:"%%NEXT%%"`
|
||||
Cluster string `yaml:"cluster" env:"OC_EVENTS_CLUSTER;COLLABORATION_EVENTS_CLUSTER" desc:"The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_EVENTS_TLS_INSECURE;COLLABORATION_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_EVENTS_TLS_ROOT_CA_CERTIFICATE;COLLABORATION_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided COLLABORATION_EVENTS_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_EVENTS_ENABLE_TLS;COLLABORATION_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"%%NEXT%%"`
|
||||
AuthUsername string `yaml:"username" env:"OC_EVENTS_AUTH_USERNAME;COLLABORATION_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"%%NEXT%%"`
|
||||
AuthPassword string `yaml:"password" env:"OC_EVENTS_AUTH_PASSWORD;COLLABORATION_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"%%NEXT%%"`
|
||||
Endpoint string `yaml:"endpoint" env:"OC_EVENTS_ENDPOINT;COLLABORATION_EVENTS_ENDPOINT" desc:"The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture." introductionVersion:"7.3.0"`
|
||||
Cluster string `yaml:"cluster" env:"OC_EVENTS_CLUSTER;COLLABORATION_EVENTS_CLUSTER" desc:"The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_EVENTS_TLS_INSECURE;COLLABORATION_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_EVENTS_TLS_ROOT_CA_CERTIFICATE;COLLABORATION_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided COLLABORATION_EVENTS_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_EVENTS_ENABLE_TLS;COLLABORATION_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"7.3.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_EVENTS_AUTH_USERNAME;COLLABORATION_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"7.3.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_EVENTS_AUTH_PASSWORD;COLLABORATION_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package config
|
||||
|
||||
type Font struct {
|
||||
AssetPath string `yaml:"asset_path" env:"COLLABORATION_FONT_ASSET_PATH" desc:"Serve fonts from a path on the filesystem instead of the builtin assets. If not defined, the root directory derives from $OC_BASE_DATA_PATH/collaboration/fonts" introductionVersion:"%%NEXT%%"`
|
||||
PreviewText string `yaml:"preview_text" env:"COLLABORATION_FONT_PREVIEW_TEXT" desc:"The text that will be displayed in the font preview." introductionVersion:"%%NEXT%%"`
|
||||
AssetPath string `yaml:"asset_path" env:"COLLABORATION_FONT_ASSET_PATH" desc:"Serve fonts from a path on the filesystem instead of the builtin assets. If not defined, the root directory derives from $OC_BASE_DATA_PATH/collaboration/fonts" introductionVersion:"7.3.0"`
|
||||
PreviewText string `yaml:"preview_text" env:"COLLABORATION_FONT_PREVIEW_TEXT" desc:"The text that will be displayed in the font preview." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -11,7 +11,7 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OC_PERSISTENT_STORE_TTL;COLLABORATION_STORE_TTL" desc:"Time to live for events in the store. Defaults to '30m' (30 minutes). See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_PERSISTENT_STORE_AUTH_USERNAME;COLLABORATION_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_PERSISTENT_STORE_AUTH_PASSWORD;COLLABORATION_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;COLLABORATION_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;COLLABORATION_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;COLLABORATION_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided COLLABORATION_STORE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;COLLABORATION_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;COLLABORATION_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;COLLABORATION_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided COLLABORATION_STORE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -43,9 +43,9 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OC_PERSISTENT_STORE_TTL;EVENTHISTORY_STORE_TTL" desc:"Time to live for events in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_PERSISTENT_STORE_AUTH_USERNAME;EVENTHISTORY_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_PERSISTENT_STORE_AUTH_PASSWORD;EVENTHISTORY_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;EVENTHISTORY_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;EVENTHISTORY_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;EVENTHISTORY_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided EVENTHISTORY_STORE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;EVENTHISTORY_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;EVENTHISTORY_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;EVENTHISTORY_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided EVENTHISTORY_STORE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
|
||||
// Events combines the configuration options for the event bus.
|
||||
|
||||
@@ -133,9 +133,9 @@ type OCS struct {
|
||||
StatCacheDisablePersistence bool `yaml:"stat_cache_disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE;FRONTEND_OCS_STAT_CACHE_DISABLE_PERSISTENCE" desc:"Disable persistence of the cache. Only applies when using the 'nats-js-kv' store type. Defaults to false." introductionVersion:"1.0.0" deprecationVersion:"1.0.0" removalVersion:"%%NEXT_PRODUCTION_VERSION%%" deprecationInfo:"FRONTEND_OCS_STAT_CACHE_DISABLE_PERSISTENCE, the OCS API is deprecated" deprecationReplacement:""`
|
||||
StatCacheAuthUsername string `yaml:"stat_cache_auth_username" env:"OC_CACHE_AUTH_USERNAME;FRONTEND_OCS_STAT_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when using the 'nats-js-kv' store type." introductionVersion:"1.0.0" deprecationVersion:"1.0.0" removalVersion:"%%NEXT_PRODUCTION_VERSION%%" deprecationInfo:"FRONTEND_OCS_STAT_CACHE_AUTH_USERNAME, the OCS API is deprecated" deprecationReplacement:""`
|
||||
StatCacheAuthPassword string `yaml:"stat_cache_auth_password" env:"OC_CACHE_AUTH_PASSWORD;FRONTEND_OCS_STAT_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when using the 'nats-js-kv' store type." introductionVersion:"1.0.0" deprecationVersion:"1.0.0" removalVersion:"%%NEXT_PRODUCTION_VERSION%%" deprecationInfo:"FRONTEND_OCS_STAT_CACHE_AUTH_PASSWORD, the OCS API is deprecated" deprecationReplacement:""`
|
||||
StatCacheEnableTLS bool `yaml:"stat_cache_enable_tls" env:"OC_CACHE_ENABLE_TLS;FRONTEND_OCS_STAT_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
StatCacheTLSInsecure bool `yaml:"stat_cache_tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;FRONTEND_OCS_STAT_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
StatCacheTLSRootCACertificate string `yaml:"stat_cache_tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;FRONTEND_OCS_STAT_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided FRONTEND_OCS_STAT_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
StatCacheEnableTLS bool `yaml:"stat_cache_enable_tls" env:"OC_CACHE_ENABLE_TLS;FRONTEND_OCS_STAT_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
StatCacheTLSInsecure bool `yaml:"stat_cache_tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;FRONTEND_OCS_STAT_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
StatCacheTLSRootCACertificate string `yaml:"stat_cache_tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;FRONTEND_OCS_STAT_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided FRONTEND_OCS_STAT_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
|
||||
CacheWarmupDriver string `yaml:"cache_warmup_driver,omitempty"` // not supported by the OpenCloud product, therefore not part of docs
|
||||
CacheWarmupDrivers CacheWarmupDrivers `yaml:"cache_warmup_drivers,omitempty"` // not supported by the OpenCloud product, therefore not part of docs
|
||||
|
||||
@@ -84,9 +84,9 @@ type Cache struct {
|
||||
ProviderCacheDisablePersistence bool `yaml:"provider_cache_disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE;GATEWAY_PROVIDER_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the provider cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"1.0.0"`
|
||||
ProviderCacheAuthUsername string `yaml:"provider_cache_auth_username" env:"OC_CACHE_AUTH_USERNAME;GATEWAY_PROVIDER_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
ProviderCacheAuthPassword string `yaml:"provider_cache_auth_password" env:"OC_CACHE_AUTH_PASSWORD;GATEWAY_PROVIDER_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
ProviderCacheEnableTLS bool `yaml:"provider_cache_enable_tls" env:"OC_CACHE_ENABLE_TLS;GATEWAY_PROVIDER_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
ProviderCacheTLSInsecure bool `yaml:"provider_cache_tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;GATEWAY_PROVIDER_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
ProviderCacheTLSRootCACertificate string `yaml:"provider_cache_tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;GATEWAY_PROVIDER_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided GATEWAY_PROVIDER_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
ProviderCacheEnableTLS bool `yaml:"provider_cache_enable_tls" env:"OC_CACHE_ENABLE_TLS;GATEWAY_PROVIDER_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
ProviderCacheTLSInsecure bool `yaml:"provider_cache_tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;GATEWAY_PROVIDER_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
ProviderCacheTLSRootCACertificate string `yaml:"provider_cache_tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;GATEWAY_PROVIDER_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided GATEWAY_PROVIDER_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
|
||||
CreateHomeCacheStore string `yaml:"create_home_cache_store" env:"OC_CACHE_STORE;GATEWAY_CREATE_HOME_CACHE_STORE" desc:"The type of the cache store. Supported values are: 'memory', 'redis-sentinel', 'nats-js-kv', 'noop'. See the text description for details." introductionVersion:"1.0.0"`
|
||||
CreateHomeCacheNodes []string `yaml:"create_home_cache_nodes" env:"OC_CACHE_STORE_NODES;GATEWAY_CREATE_HOME_CACHE_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' store is configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
@@ -95,7 +95,7 @@ type Cache struct {
|
||||
CreateHomeCacheDisablePersistence bool `yaml:"create_home_cache_disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE;GATEWAY_CREATE_HOME_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the create home cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"1.0.0"`
|
||||
CreateHomeCacheAuthUsername string `yaml:"create_home_cache_auth_username" env:"OC_CACHE_AUTH_USERNAME;GATEWAY_CREATE_HOME_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
CreateHomeCacheAuthPassword string `yaml:"create_home_cache_auth_password" env:"OC_CACHE_AUTH_PASSWORD;GATEWAY_CREATE_HOME_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
CreateHomeCacheEnableTLS bool `yaml:"create_home_cache_enable_tls" env:"OC_CACHE_ENABLE_TLS;GATEWAY_CREATE_HOME_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
CreateHomeCacheTLSInsecure bool `yaml:"create_home_cache_tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;GATEWAY_CREATE_HOME_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
CreateHomeCacheTLSRootCACertificate string `yaml:"create_home_cache_tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;GATEWAY_CREATE_HOME_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided GATEWAY_CREATE_HOME_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
CreateHomeCacheEnableTLS bool `yaml:"create_home_cache_enable_tls" env:"OC_CACHE_ENABLE_TLS;GATEWAY_CREATE_HOME_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
CreateHomeCacheTLSInsecure bool `yaml:"create_home_cache_tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;GATEWAY_CREATE_HOME_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
CreateHomeCacheTLSRootCACertificate string `yaml:"create_home_cache_tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;GATEWAY_CREATE_HOME_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided GATEWAY_CREATE_HOME_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -12,7 +12,7 @@ type Cache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE;GRAPH_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_CACHE_AUTH_USERNAME;GRAPH_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_CACHE_AUTH_PASSWORD;GRAPH_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;GRAPH_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;GRAPH_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;GRAPH_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided GRAPH_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;GRAPH_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;GRAPH_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;GRAPH_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided GRAPH_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -176,7 +176,7 @@ type Store struct {
|
||||
Database string `yaml:"database" env:"GRAPH_STORE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_PERSISTENT_STORE_AUTH_USERNAME;GRAPH_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_PERSISTENT_STORE_AUTH_PASSWORD;GRAPH_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;GRAPH_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;GRAPH_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;GRAPH_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided GRAPH_STORE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;GRAPH_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;GRAPH_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;GRAPH_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided GRAPH_STORE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
*.mo
|
||||
dev-translation.json
|
||||
|
||||
# i18next-cli extracted keys (intermediate, regenerated on demand)
|
||||
translation.*.json
|
||||
@@ -15,27 +15,31 @@ POS ?= $(wildcard *.po)
|
||||
.PHONY: build
|
||||
build: json
|
||||
|
||||
.PYTHON: json
|
||||
.PHONY: json
|
||||
json:
|
||||
@for po in $(POS); do \
|
||||
lang=$$(echo $$po | sed "s/\.po//"); \
|
||||
$(PNPM) i18next-conv -K --skipUntranslated -l $$lang -s i18n/$$po -t ../src/locales/$$lang/translation.json; \
|
||||
$(PNPM) i18next-conv -K --skipUntranslated -l $$lang -s $$po -t ../src/locales/$$lang/translation.json; \
|
||||
done
|
||||
$(PNPM) node i18n/build-json.js ../src/locales/locales.json $(POS)
|
||||
$(PNPM) node build-json.js ../src/locales/locales.json $(POS)
|
||||
|
||||
dev-translation.json: FORCE
|
||||
$(PNPM) i18next --fail-on-warnings
|
||||
.PHONY: extract-keys
|
||||
extract-keys:
|
||||
$(PNPM) i18next-cli extract -q || true
|
||||
|
||||
translation.en.json: FORCE
|
||||
$(MAKE) extract-keys
|
||||
|
||||
.PHONY: extract
|
||||
extract: pot
|
||||
|
||||
.PHONY: pot
|
||||
pot: dev-translation.json
|
||||
pot: translation.en.json
|
||||
@tmpfile1=$(shell mktemp).po; \
|
||||
tmpfile2=$(shell mktemp).po; \
|
||||
trap 'rm -f "$$tmpfile1" "$$tmpfile2"' EXIT; \
|
||||
$(PNPM) i18next-conv --project "LibreGraph Connect Identifier" -K -l en -s i18n/dev-translation.json -t $$tmpfile1; \
|
||||
$(PNPM) node i18n/build-pot.js $$tmpfile1 $$tmpfile2; \
|
||||
$(PNPM) i18next-conv --project "LibreGraph Connect Identifier" -K -l en -s translation.en.json -t $$tmpfile1; \
|
||||
$(PNPM) node build-pot.js $$tmpfile1 $$tmpfile2; \
|
||||
$(MSGCAT) --no-wrap -o $(POT) $$tmpfile2
|
||||
|
||||
.PHONY: merge
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
# IDP Translations
|
||||
|
||||
## Overview
|
||||
|
||||
The IDP service uses i18next for internationalization with gettext (`.po`)
|
||||
files as the source of truth for translations. The workflow is:
|
||||
|
||||
```text
|
||||
Source code t() calls → extract keys → .pot template
|
||||
→ merge into .po → convert to JSON → app bundles
|
||||
```
|
||||
|
||||
## File Structure
|
||||
|
||||
- `i18n/*.po` — translation files per language (committed)
|
||||
- `i18n/translation.pot` — extracted keys template (committed)
|
||||
- `i18n/translation.en.json` — intermediate EN keys (gitignored)
|
||||
- `src/locales/*/translation.json` — JSON translations at runtime (committed)
|
||||
- `src/locales/locales.json` — language metadata for locale selector (committed)
|
||||
|
||||
## Adding New Translation Keys
|
||||
|
||||
### 1. Add a key in source code
|
||||
|
||||
```jsx
|
||||
t("konnect.new.key", "Default fallback text")
|
||||
```
|
||||
|
||||
The first argument is the i18next key path (dot notation for nested JSON). The
|
||||
second argument is the default/fallback English text — this is what translators
|
||||
see in `.po` files as `msgid`.
|
||||
|
||||
### 2. Extract new keys into the `.pot` template
|
||||
|
||||
```bash
|
||||
make -C i18n extract
|
||||
```
|
||||
|
||||
This runs `i18next-cli extract` to scan all `src/**/*.{js,jsx,ts,tsx}` files,
|
||||
writes extracted English keys to `i18n/translation.en.json`, then converts
|
||||
them into `translation.pot`.
|
||||
|
||||
### 3. Merge new keys into existing `.po` files
|
||||
|
||||
```bash
|
||||
make -C i18n merge
|
||||
```
|
||||
|
||||
This runs `msgmerge` on each `.po` file to add any new keys from the updated
|
||||
`.pot` template. Translators then fill in translations for the new entries.
|
||||
|
||||
### 4. Convert `.po` files to JSON for the app
|
||||
|
||||
```bash
|
||||
make -C i18n json
|
||||
```
|
||||
|
||||
This runs `i18next-conv` on each `.po` file to produce
|
||||
`src/locales/{lang}/translation.json`. This step is also run automatically by
|
||||
`make build`.
|
||||
|
||||
## Runtime Loading
|
||||
|
||||
The app loads translations via dynamic webpack imports:
|
||||
|
||||
```typescript
|
||||
// src/i18n.ts
|
||||
import(`./locales/${language}/translation.json`)
|
||||
```
|
||||
|
||||
When the user selects a language, i18next fetches the corresponding JSON file.
|
||||
The locale selector reads available languages from `src/locales/locales.json`.
|
||||
|
||||
## Build and CI
|
||||
|
||||
- **`make build`** → runs `make json` to convert `.po` files to JSON before
|
||||
webpack bundling
|
||||
- **CI (Woodpecker)** runs `make node-generate-prod` which calls
|
||||
`pnpm install && pnpm build` — no translation extraction happens in CI, only
|
||||
the committed JSON files are bundled
|
||||
|
||||
## Tools
|
||||
|
||||
- `i18next-cli` — extracts keys from source code (AST-based)
|
||||
- `i18next-conv` — converts between `.po` and i18next JSON
|
||||
- `msgmerge` / `msgcat` — standard gettext merge/collate tools
|
||||
- `gettext-parser` — cleans headers in generated POT file
|
||||
|
||||
## Configuration
|
||||
|
||||
- `i18n/i18next.config.ts` — extraction config (input globs, output path)
|
||||
- `src/i18n.ts` — runtime setup (detection, fallbacks, backend loader)
|
||||
+2
-12
@@ -57,11 +57,6 @@ msgstr "Konto auswählen"
|
||||
msgid "Clicking \"Allow\" will redirect you to: {{redirectURI}}"
|
||||
msgstr "Wenn Sie \"Einverstanden\" klicken werden Sie zu {{redirectURI}} weitergeleitet"
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##email
|
||||
#: konnect##login##usernameField##placeholder##email
|
||||
msgid "Email"
|
||||
msgstr "E-Mail"
|
||||
|
||||
#. From: konnect##error##login##validate##missingUsername
|
||||
#: konnect##error##login##validate##missingUsername
|
||||
msgid "Enter a valid value."
|
||||
@@ -92,11 +87,6 @@ msgstr "Hallo {{displayName}}"
|
||||
msgid "Hi {{displayName}}"
|
||||
msgstr "Hallo {{displayName}}"
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##identity
|
||||
#: konnect##login##usernameField##placeholder##identity
|
||||
msgid "Identity"
|
||||
msgstr "Identität"
|
||||
|
||||
#. From: konnect##scopeDescription##offlineAccess
|
||||
#: konnect##scopeDescription##offlineAccess
|
||||
msgid "Keep the allowed access persistently and forever"
|
||||
@@ -164,8 +154,8 @@ msgstr "Unerwarteter Antwort-Status: {{state}}"
|
||||
msgid "Use another account"
|
||||
msgstr "Anderes Konto"
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##username
|
||||
#: konnect##login##usernameField##placeholder##username
|
||||
#. From: konnect##login##usernameField##label
|
||||
#: konnect##login##usernameField##label
|
||||
msgid "Username"
|
||||
msgstr "Benutzername"
|
||||
|
||||
|
||||
+2
-12
@@ -56,11 +56,6 @@ msgstr ""
|
||||
msgid "Clicking \"Allow\" will redirect you to: {{redirectURI}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##email
|
||||
#: konnect##login##usernameField##placeholder##email
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##login##validate##missingUsername
|
||||
#: konnect##error##login##validate##missingUsername
|
||||
msgid "Enter a valid value."
|
||||
@@ -91,11 +86,6 @@ msgstr ""
|
||||
msgid "Hi {{displayName}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##identity
|
||||
#: konnect##login##usernameField##placeholder##identity
|
||||
msgid "Identity"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##scopeDescription##offlineAccess
|
||||
#: konnect##scopeDescription##offlineAccess
|
||||
msgid "Keep the allowed access persistently and forever"
|
||||
@@ -163,8 +153,8 @@ msgstr ""
|
||||
msgid "Use another account"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##username
|
||||
#: konnect##login##usernameField##placeholder##username
|
||||
#. From: konnect##login##usernameField##label
|
||||
#: konnect##login##usernameField##label
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+2
-12
@@ -57,11 +57,6 @@ msgstr "Choisir un compte"
|
||||
msgid "Clicking \"Allow\" will redirect you to: {{redirectURI}}"
|
||||
msgstr "En cliquant \"Autoriser\" vous serez redirigé vers: {{redirectURI}}"
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##email
|
||||
#: konnect##login##usernameField##placeholder##email
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##login##validate##missingUsername
|
||||
#: konnect##error##login##validate##missingUsername
|
||||
msgid "Enter a valid value."
|
||||
@@ -92,11 +87,6 @@ msgstr "Bonjour {{displayName}}"
|
||||
msgid "Hi {{displayName}}"
|
||||
msgstr "Bonjour {{displayName}}"
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##identity
|
||||
#: konnect##login##usernameField##placeholder##identity
|
||||
msgid "Identity"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##scopeDescription##offlineAccess
|
||||
#: konnect##scopeDescription##offlineAccess
|
||||
msgid "Keep the allowed access persistently and forever"
|
||||
@@ -164,8 +154,8 @@ msgstr "Erreur d'état inattendue : {{state}}"
|
||||
msgid "Use another account"
|
||||
msgstr "Utiliser un autre compte"
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##username
|
||||
#: konnect##login##usernameField##placeholder##username
|
||||
#. From: konnect##login##usernameField##label
|
||||
#: konnect##login##usernameField##label
|
||||
msgid "Username"
|
||||
msgstr "Utilisateur"
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import { defineConfig } from 'i18next-cli';
|
||||
|
||||
export default defineConfig({
|
||||
locales: ['en'],
|
||||
extract: {
|
||||
currentLocale: 'en',
|
||||
input: ['../src/**/*.{js,jsx,ts,tsx}'],
|
||||
output: 'translation.{{language}}.json',
|
||||
},
|
||||
});
|
||||
+2
-12
@@ -57,11 +57,6 @@ msgstr ""
|
||||
msgid "Clicking \"Allow\" will redirect you to: {{redirectURI}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##email
|
||||
#: konnect##login##usernameField##placeholder##email
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##login##validate##missingUsername
|
||||
#: konnect##error##login##validate##missingUsername
|
||||
msgid "Enter a valid value."
|
||||
@@ -92,11 +87,6 @@ msgstr ""
|
||||
msgid "Hi {{displayName}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##identity
|
||||
#: konnect##login##usernameField##placeholder##identity
|
||||
msgid "Identity"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##scopeDescription##offlineAccess
|
||||
#: konnect##scopeDescription##offlineAccess
|
||||
msgid "Keep the allowed access persistently and forever"
|
||||
@@ -164,8 +154,8 @@ msgstr ""
|
||||
msgid "Use another account"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##username
|
||||
#: konnect##login##usernameField##placeholder##username
|
||||
#. From: konnect##login##usernameField##label
|
||||
#: konnect##login##usernameField##label
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+2
-12
@@ -57,11 +57,6 @@ msgstr "Account kiezen"
|
||||
msgid "Clicking \"Allow\" will redirect you to: {{redirectURI}}"
|
||||
msgstr "Door op \"Toestaan\" te klikken word je doorverwezen naar: {{redirectURI}}"
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##email
|
||||
#: konnect##login##usernameField##placeholder##email
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##login##validate##missingUsername
|
||||
#: konnect##error##login##validate##missingUsername
|
||||
msgid "Enter a valid value."
|
||||
@@ -92,11 +87,6 @@ msgstr "Hallo {{displayName}}"
|
||||
msgid "Hi {{displayName}}"
|
||||
msgstr "Hoi {{displayName}}"
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##identity
|
||||
#: konnect##login##usernameField##placeholder##identity
|
||||
msgid "Identity"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##scopeDescription##offlineAccess
|
||||
#: konnect##scopeDescription##offlineAccess
|
||||
msgid "Keep the allowed access persistently and forever"
|
||||
@@ -164,8 +154,8 @@ msgstr "Onverwachte respons status: {{state}}"
|
||||
msgid "Use another account"
|
||||
msgstr "Gebruik een ander account"
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##username
|
||||
#: konnect##login##usernameField##placeholder##username
|
||||
#. From: konnect##login##usernameField##label
|
||||
#: konnect##login##usernameField##label
|
||||
msgid "Username"
|
||||
msgstr "Gebruikersnaam"
|
||||
|
||||
|
||||
+151
-156
@@ -3,192 +3,187 @@ msgstr ""
|
||||
"Project-Id-Version: LibreGraph Connect Identifier\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"POT-Creation-Date: 2022-03-09T19:33:04.641Z\n"
|
||||
"POT-Creation-Date: 2026-07-08T15:11:00.860Z\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
||||
#. From: konnect##loading##error##headline
|
||||
#: konnect##loading##error##headline
|
||||
msgid "Failed to connect to server"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##retryButton##label
|
||||
#: konnect##login##retryButton##label
|
||||
msgid "Retry"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##email
|
||||
#: konnect##login##usernameField##placeholder##email
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##identity
|
||||
#: konnect##login##usernameField##placeholder##identity
|
||||
msgid "Identity"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##username
|
||||
#: konnect##login##usernameField##placeholder##username
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##headline
|
||||
#: konnect##login##headline
|
||||
msgid "Sign in"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##passwordField##label
|
||||
#: konnect##login##passwordField##label
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##nextButton##label
|
||||
#: konnect##login##nextButton##label
|
||||
msgid "Next"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##scopeDescription##aliasBasic
|
||||
#: konnect##scopeDescription##aliasBasic
|
||||
msgid "Access your basic account information"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##scopeDescription##offlineAccess
|
||||
#: konnect##scopeDescription##offlineAccess
|
||||
msgid "Keep the allowed access persistently and forever"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##scopeDescription##scope
|
||||
#: konnect##scopeDescription##scope
|
||||
msgid "Scope: {{scope}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##goodbye##headline
|
||||
#: konnect##goodbye##headline
|
||||
msgid "Goodbye"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##goodbye##subHeader
|
||||
#: konnect##goodbye##subHeader
|
||||
msgid "you have been signed out from your account"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##goodbye##message##close
|
||||
#: konnect##goodbye##message##close
|
||||
msgid "You can close this window now."
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##goodbye##message##confirm
|
||||
#: konnect##goodbye##message##confirm
|
||||
msgid "Press the button below, to sign out from your account now."
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##goodbye##confirm##headline
|
||||
#: konnect##goodbye##confirm##headline
|
||||
msgid "Hello {{displayName}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##goodbye##confirm##subHeader
|
||||
#: konnect##goodbye##confirm##subHeader
|
||||
msgid "please confirm sign out"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##goodbye##signoutButton##label
|
||||
#. konnect##welcome##signoutButton##label
|
||||
#: konnect##goodbye##signoutButton##label
|
||||
#: konnect##welcome##signoutButton##label
|
||||
msgid "Sign out"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##chooseaccount##headline
|
||||
#: konnect##chooseaccount##headline
|
||||
#. From: translation##konnect##chooseaccount##headline
|
||||
#: translation##konnect##chooseaccount##headline
|
||||
msgid "Choose an account"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##chooseaccount##subHeader
|
||||
#: konnect##chooseaccount##subHeader
|
||||
#. From: translation##konnect##chooseaccount##subHeader
|
||||
#: translation##konnect##chooseaccount##subHeader
|
||||
msgid "to sign in"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##chooseaccount##useOther##persona##label
|
||||
#: konnect##chooseaccount##useOther##persona##label
|
||||
msgid "?"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##chooseaccount##useOther##label
|
||||
#: konnect##chooseaccount##useOther##label
|
||||
#. From: translation##konnect##chooseaccount##useOther##label
|
||||
#: translation##konnect##chooseaccount##useOther##label
|
||||
msgid "Use another account"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##consent##headline
|
||||
#: konnect##consent##headline
|
||||
msgid "Hi {{displayName}}"
|
||||
#. From: translation##konnect##chooseaccount##useOther##persona##label
|
||||
#: translation##konnect##chooseaccount##useOther##persona##label
|
||||
msgid "?"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##consent##message
|
||||
#: konnect##consent##message
|
||||
msgid "<0><0><0></0></0></0> wants to"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##consent##tooltip##client
|
||||
#: konnect##consent##tooltip##client
|
||||
msgid "Clicking \"Allow\" will redirect you to: {{redirectURI}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##consent##question
|
||||
#: konnect##consent##question
|
||||
msgid "Allow <1><0></0></1> to do this?"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##consent##consequence
|
||||
#: konnect##consent##consequence
|
||||
msgid "By clicking Allow, you allow this app to use your information."
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##consent##cancelButton##label
|
||||
#: konnect##consent##cancelButton##label
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##consent##allowButton##label
|
||||
#: konnect##consent##allowButton##label
|
||||
#. From: translation##konnect##consent##allowButton##label
|
||||
#: translation##konnect##consent##allowButton##label
|
||||
msgid "Allow"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##welcome##headline
|
||||
#: konnect##welcome##headline
|
||||
msgid "Welcome {{displayName}}"
|
||||
#. From: translation##konnect##consent##cancelButton##label
|
||||
#: translation##konnect##consent##cancelButton##label
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##welcome##message
|
||||
#: konnect##welcome##message
|
||||
msgid "You are signed in - awesome!"
|
||||
#. From: translation##konnect##consent##consequence
|
||||
#: translation##konnect##consent##consequence
|
||||
msgid "By clicking Allow, you allow this app to use your information."
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##login##validate##missingUsername
|
||||
#: konnect##error##login##validate##missingUsername
|
||||
msgid "Enter a valid value."
|
||||
#. From: translation##konnect##consent##headline
|
||||
#: translation##konnect##consent##headline
|
||||
msgid "Hi {{displayName}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##login##validate##missingPassword
|
||||
#: konnect##error##login##validate##missingPassword
|
||||
msgid "Enter your password."
|
||||
#. From: translation##konnect##consent##message
|
||||
#: translation##konnect##consent##message
|
||||
msgid "<0><0><0></0></0></0> wants to"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##login##failed
|
||||
#: konnect##error##login##failed
|
||||
msgid "Logon failed. Please verify your credentials and try again."
|
||||
#. From: translation##konnect##consent##question
|
||||
#: translation##konnect##consent##question
|
||||
msgid "Allow <1><0></0></1> to do this?"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##http##networkError
|
||||
#: konnect##error##http##networkError
|
||||
#. From: translation##konnect##consent##tooltip##client
|
||||
#: translation##konnect##consent##tooltip##client
|
||||
msgid "Clicking \"Allow\" will redirect you to: {{redirectURI}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##error##http##networkError
|
||||
#: translation##konnect##error##http##networkError
|
||||
msgid "Network error. Please check your connection and try again."
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##http##unexpectedResponseStatus
|
||||
#: konnect##error##http##unexpectedResponseStatus
|
||||
#. From: translation##konnect##error##http##unexpectedResponseState
|
||||
#: translation##konnect##error##http##unexpectedResponseState
|
||||
msgid "Unexpected response state: {{state}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##error##http##unexpectedResponseStatus
|
||||
#: translation##konnect##error##http##unexpectedResponseStatus
|
||||
msgid "Unexpected HTTP response: {{status}}. Please check your connection and try again."
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##http##unexpectedResponseState
|
||||
#: konnect##error##http##unexpectedResponseState
|
||||
msgid "Unexpected response state: {{state}}"
|
||||
#. From: translation##konnect##error##login##failed
|
||||
#: translation##konnect##error##login##failed
|
||||
msgid "Logon failed. Please verify your credentials and try again."
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##error##login##validate##missingPassword
|
||||
#: translation##konnect##error##login##validate##missingPassword
|
||||
msgid "Enter your password."
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##error##login##validate##missingUsername
|
||||
#: translation##konnect##error##login##validate##missingUsername
|
||||
msgid "Enter a valid value."
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##footer##slogan
|
||||
#: translation##konnect##footer##slogan
|
||||
msgid "<strong>OpenCloud</strong> - excellent file sharing"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##goodbye##confirm##headline
|
||||
#: translation##konnect##goodbye##confirm##headline
|
||||
msgid "Hello {{displayName}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##goodbye##confirm##subHeader
|
||||
#: translation##konnect##goodbye##confirm##subHeader
|
||||
msgid "please confirm sign out"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##goodbye##headline
|
||||
#: translation##konnect##goodbye##headline
|
||||
msgid "Goodbye"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##goodbye##message##close
|
||||
#: translation##konnect##goodbye##message##close
|
||||
msgid "You can close this window now."
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##goodbye##message##confirm
|
||||
#: translation##konnect##goodbye##message##confirm
|
||||
msgid "Press the button below, to sign out from your account now."
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##goodbye##signoutButton##label
|
||||
#. translation##konnect##welcome##signoutButton##label
|
||||
#: translation##konnect##goodbye##signoutButton##label
|
||||
#: translation##konnect##welcome##signoutButton##label
|
||||
msgid "Sign out"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##goodbye##subHeader
|
||||
#: translation##konnect##goodbye##subHeader
|
||||
msgid "you have been signed out from your account"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##loading##error##headline
|
||||
#: translation##konnect##loading##error##headline
|
||||
msgid "Failed to connect to server"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##login##headline
|
||||
#: translation##konnect##login##headline
|
||||
msgid "Sign in"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##login##nextButton##label
|
||||
#: translation##konnect##login##nextButton##label
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##login##passwordField##label
|
||||
#: translation##konnect##login##passwordField##label
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##login##retryButton##label
|
||||
#: translation##konnect##login##retryButton##label
|
||||
msgid "Retry"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##login##usernameField##label
|
||||
#: translation##konnect##login##usernameField##label
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##scopeDescription##aliasBasic
|
||||
#: translation##konnect##scopeDescription##aliasBasic
|
||||
msgid "Access your basic account information"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##scopeDescription##offlineAccess
|
||||
#: translation##konnect##scopeDescription##offlineAccess
|
||||
msgid "Keep the allowed access persistently and forever"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##scopeDescription##scope
|
||||
#: translation##konnect##scopeDescription##scope
|
||||
msgid "Scope: {{scope}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##welcome##headline
|
||||
#: translation##konnect##welcome##headline
|
||||
msgid "Welcome {{displayName}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: translation##konnect##welcome##message
|
||||
#: translation##konnect##welcome##message
|
||||
msgid "You are signed in - awesome!"
|
||||
msgstr ""
|
||||
@@ -55,11 +55,6 @@ msgstr ""
|
||||
msgid "Clicking \"Allow\" will redirect you to: {{redirectURI}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##email
|
||||
#: konnect##login##usernameField##placeholder##email
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##error##login##validate##missingUsername
|
||||
#: konnect##error##login##validate##missingUsername
|
||||
msgid "Enter a valid value."
|
||||
@@ -90,11 +85,6 @@ msgstr ""
|
||||
msgid "Hi {{displayName}}"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##identity
|
||||
#: konnect##login##usernameField##placeholder##identity
|
||||
msgid "Identity"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##scopeDescription##offlineAccess
|
||||
#: konnect##scopeDescription##offlineAccess
|
||||
msgid "Keep the allowed access persistently and forever"
|
||||
@@ -162,8 +152,8 @@ msgstr ""
|
||||
msgid "Use another account"
|
||||
msgstr ""
|
||||
|
||||
#. From: konnect##login##usernameField##placeholder##username
|
||||
#: konnect##login##usernameField##placeholder##username
|
||||
#. From: konnect##login##usernameField##label
|
||||
#: konnect##login##usernameField##label
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -61,9 +61,10 @@
|
||||
"css-minimizer-webpack-plugin": "^8.0.0",
|
||||
"dotenv": "17.4.2",
|
||||
"dotenv-expand": "^13.0.0",
|
||||
"gettext-parser": "^9.0.2",
|
||||
"html-webpack-plugin": "^5.6.7",
|
||||
"i18next-cli": "^1.65.0",
|
||||
"i18next-conv": "^17.0.0",
|
||||
"i18next-parser": "^9.4.0",
|
||||
"license-checker-rseidelsohn": "5.0.1",
|
||||
"mini-css-extract-plugin": "2.9.2",
|
||||
"pnp-webpack-plugin": "1.7.0",
|
||||
|
||||
Generated
+787
-1144
File diff suppressed because it is too large.
Load diff
@@ -26,7 +26,8 @@ overrides:
|
||||
"serialize-javascript@<7.0.3": ">=7.0.3"
|
||||
shell-quote: ">=1.8.4"
|
||||
"@babel/plugin-transform-modules-systemjs": ">=7.29.4"
|
||||
"@xmldom/xmldom": ">=0.8.13"
|
||||
"@xmldom/xmldom": "^0.8.13"
|
||||
|
||||
allowBuilds:
|
||||
'@swc/core': false
|
||||
esbuild: true
|
||||
@@ -30,26 +30,6 @@
|
||||
"offlineAccess": "Dauerhaften Zugriff (läuft nicht ab)",
|
||||
"scope": "Geltungsbereich: {{scope}}"
|
||||
},
|
||||
"login": {
|
||||
"usernameField": {
|
||||
"label": "Benutzername",
|
||||
"placeholder": {
|
||||
"email": "E-Mail",
|
||||
"identity": "Identität",
|
||||
"username": "Benutzername"
|
||||
}
|
||||
},
|
||||
"nextButton": {
|
||||
"label": "Weiter"
|
||||
},
|
||||
"passwordField": {
|
||||
"label": "Passwort"
|
||||
},
|
||||
"retryButton": {
|
||||
"label": "Wiederholen"
|
||||
},
|
||||
"headline": "Anmelden"
|
||||
},
|
||||
"error": {
|
||||
"login": {
|
||||
"validate": {
|
||||
@@ -84,6 +64,21 @@
|
||||
},
|
||||
"subHeader": "sie sind jetzt abgemeldet"
|
||||
},
|
||||
"login": {
|
||||
"nextButton": {
|
||||
"label": "Weiter"
|
||||
},
|
||||
"passwordField": {
|
||||
"label": "Passwort"
|
||||
},
|
||||
"retryButton": {
|
||||
"label": "Wiederholen"
|
||||
},
|
||||
"headline": "Anmelden",
|
||||
"usernameField": {
|
||||
"label": "Benutzername"
|
||||
}
|
||||
},
|
||||
"welcome": {
|
||||
"signoutButton": {
|
||||
"label": "Abmelden"
|
||||
@@ -92,4 +87,4 @@
|
||||
"message": "Sie sind angemeldet - super!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,14 +11,6 @@
|
||||
}
|
||||
},
|
||||
"scopeDescription": {},
|
||||
"login": {
|
||||
"usernameField": {
|
||||
"placeholder": {}
|
||||
},
|
||||
"nextButton": {},
|
||||
"passwordField": {},
|
||||
"retryButton": {}
|
||||
},
|
||||
"error": {
|
||||
"login": {
|
||||
"validate": {}
|
||||
@@ -33,6 +25,12 @@
|
||||
"message": {},
|
||||
"signoutButton": {}
|
||||
},
|
||||
"login": {
|
||||
"nextButton": {},
|
||||
"passwordField": {},
|
||||
"retryButton": {},
|
||||
"usernameField": {}
|
||||
},
|
||||
"welcome": {
|
||||
"signoutButton": {}
|
||||
}
|
||||
|
||||
@@ -30,23 +30,6 @@
|
||||
"offlineAccess": "Conserver les autorisations d'accès à l'avenir",
|
||||
"scope": "Portée : {{scope}}"
|
||||
},
|
||||
"login": {
|
||||
"usernameField": {
|
||||
"placeholder": {
|
||||
"username": "Utilisateur"
|
||||
}
|
||||
},
|
||||
"nextButton": {
|
||||
"label": "Suivant"
|
||||
},
|
||||
"passwordField": {
|
||||
"label": "Mot de passe"
|
||||
},
|
||||
"retryButton": {
|
||||
"label": "Réessayer"
|
||||
},
|
||||
"headline": "Identification"
|
||||
},
|
||||
"error": {
|
||||
"login": {
|
||||
"validate": {
|
||||
@@ -80,6 +63,21 @@
|
||||
},
|
||||
"subHeader": "vous avez été déconnecté"
|
||||
},
|
||||
"login": {
|
||||
"nextButton": {
|
||||
"label": "Suivant"
|
||||
},
|
||||
"passwordField": {
|
||||
"label": "Mot de passe"
|
||||
},
|
||||
"retryButton": {
|
||||
"label": "Réessayer"
|
||||
},
|
||||
"headline": "Identification",
|
||||
"usernameField": {
|
||||
"label": "Utilisateur"
|
||||
}
|
||||
},
|
||||
"welcome": {
|
||||
"signoutButton": {
|
||||
"label": "Quitter"
|
||||
|
||||
@@ -11,14 +11,6 @@
|
||||
}
|
||||
},
|
||||
"scopeDescription": {},
|
||||
"login": {
|
||||
"usernameField": {
|
||||
"placeholder": {}
|
||||
},
|
||||
"nextButton": {},
|
||||
"passwordField": {},
|
||||
"retryButton": {}
|
||||
},
|
||||
"error": {
|
||||
"login": {
|
||||
"validate": {}
|
||||
@@ -33,6 +25,12 @@
|
||||
"message": {},
|
||||
"signoutButton": {}
|
||||
},
|
||||
"login": {
|
||||
"nextButton": {},
|
||||
"passwordField": {},
|
||||
"retryButton": {},
|
||||
"usernameField": {}
|
||||
},
|
||||
"welcome": {
|
||||
"signoutButton": {}
|
||||
}
|
||||
|
||||
@@ -30,23 +30,6 @@
|
||||
"offlineAccess": "De toestemming voor altijd onthouden",
|
||||
"scope": "Scope: {{scope}}"
|
||||
},
|
||||
"login": {
|
||||
"usernameField": {
|
||||
"placeholder": {
|
||||
"username": "Gebruikersnaam"
|
||||
}
|
||||
},
|
||||
"nextButton": {
|
||||
"label": "Volgende"
|
||||
},
|
||||
"passwordField": {
|
||||
"label": "Wachtwoord"
|
||||
},
|
||||
"retryButton": {
|
||||
"label": "Opnieuw"
|
||||
},
|
||||
"headline": "Aanmelden"
|
||||
},
|
||||
"error": {
|
||||
"login": {
|
||||
"validate": {
|
||||
@@ -80,6 +63,21 @@
|
||||
},
|
||||
"subHeader": "je bent afgemeld van je account"
|
||||
},
|
||||
"login": {
|
||||
"nextButton": {
|
||||
"label": "Volgende"
|
||||
},
|
||||
"passwordField": {
|
||||
"label": "Wachtwoord"
|
||||
},
|
||||
"retryButton": {
|
||||
"label": "Opnieuw"
|
||||
},
|
||||
"headline": "Aanmelden",
|
||||
"usernameField": {
|
||||
"label": "Gebruikersnaam"
|
||||
}
|
||||
},
|
||||
"welcome": {
|
||||
"signoutButton": {
|
||||
"label": "Afmelden"
|
||||
|
||||
@@ -11,14 +11,6 @@
|
||||
}
|
||||
},
|
||||
"scopeDescription": {},
|
||||
"login": {
|
||||
"usernameField": {
|
||||
"placeholder": {}
|
||||
},
|
||||
"nextButton": {},
|
||||
"passwordField": {},
|
||||
"retryButton": {}
|
||||
},
|
||||
"error": {
|
||||
"login": {
|
||||
"validate": {}
|
||||
@@ -33,6 +25,12 @@
|
||||
"message": {},
|
||||
"signoutButton": {}
|
||||
},
|
||||
"login": {
|
||||
"nextButton": {},
|
||||
"passwordField": {},
|
||||
"retryButton": {},
|
||||
"usernameField": {}
|
||||
},
|
||||
"welcome": {
|
||||
"signoutButton": {}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OC_PERSISTENT_STORE_TTL;NOTIFICATIONS_STORE_TTL" desc:"Time to live for notifications in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_PERSISTENT_STORE_AUTH_USERNAME;NOTIFICATIONS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_PERSISTENT_STORE_AUTH_PASSWORD;NOTIFICATIONS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;NOTIFICATIONS_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;NOTIFICATIONS_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;NOTIFICATIONS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided NOTIFICATIONS_STORE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;NOTIFICATIONS_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;NOTIFICATIONS_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;NOTIFICATIONS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided NOTIFICATIONS_STORE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -36,7 +36,7 @@ type SigningKeys struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OC_CACHE_TTL;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TTL" desc:"Default time to live for signing keys. See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_CACHE_AUTH_USERNAME;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_CACHE_AUTH_PASSWORD;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -66,7 +66,7 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OC_PERSISTENT_STORE_TTL;POSTPROCESSING_STORE_TTL" desc:"Time to live for events in the store. See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_PERSISTENT_STORE_AUTH_USERNAME;POSTPROCESSING_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_PERSISTENT_STORE_AUTH_PASSWORD;POSTPROCESSING_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;POSTPROCESSING_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;POSTPROCESSING_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;POSTPROCESSING_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided POSTPROCESSING_STORE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;POSTPROCESSING_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;POSTPROCESSING_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;POSTPROCESSING_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided POSTPROCESSING_STORE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -140,9 +140,9 @@ type Cache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE;PROXY_OIDC_USERINFO_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_CACHE_AUTH_USERNAME;PROXY_OIDC_USERINFO_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_CACHE_AUTH_PASSWORD;PROXY_OIDC_USERINFO_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;PROXY_OIDC_USERINFO_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;PROXY_OIDC_USERINFO_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;PROXY_OIDC_USERINFO_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided PROXY_OIDC_USERINFO_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;PROXY_OIDC_USERINFO_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;PROXY_OIDC_USERINFO_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;PROXY_OIDC_USERINFO_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided PROXY_OIDC_USERINFO_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
|
||||
// RoleAssignment contains the configuration for how to assign roles to users during login
|
||||
@@ -198,9 +198,9 @@ type SigningKeys struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_DISABLE_PERSISTENCE" desc:"Disables persistence of the store. Only applies when store type 'nats-js-kv' is configured. Defaults to true." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_CACHE_AUTH_USERNAME;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_CACHE_AUTH_PASSWORD;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
|
||||
// ClaimsSelectorConf is the config for the claims-selector
|
||||
|
||||
@@ -34,6 +34,7 @@ func NewOIDCAuthenticator(opts ...Option) *OIDCAuthenticator {
|
||||
userInfoCache: options.UserInfoCache,
|
||||
HTTPClient: options.HTTPClient,
|
||||
OIDCIss: options.OIDCIss,
|
||||
DefaultTokenCacheTTL: options.DefaultAccessTokenTTL,
|
||||
oidcClient: options.OIDCClient,
|
||||
AccessTokenVerifyMethod: options.AccessTokenVerifyMethod,
|
||||
skipUserInfo: options.SkipUserInfo,
|
||||
|
||||
@@ -53,6 +53,14 @@ var _ = Describe("Authenticating requests", Label("OIDCAuthenticator"), func() {
|
||||
}
|
||||
})
|
||||
|
||||
It("should apply the default access token ttl option", func() {
|
||||
ttl := 5 * time.Minute
|
||||
|
||||
authenticator := NewOIDCAuthenticator(DefaultAccessTokenTTL(ttl))
|
||||
|
||||
Expect(authenticator.DefaultTokenCacheTTL).To(Equal(ttl))
|
||||
})
|
||||
|
||||
When("the request contains correct data", func() {
|
||||
It("should successfully authenticate", func() {
|
||||
req := httptest.NewRequest(http.MethodGet, "http://example.com/example/path", http.NoBody)
|
||||
|
||||
@@ -64,7 +64,7 @@ type Cache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE;SETTINGS_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_CACHE_AUTH_USERNAME;SETTINGS_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_CACHE_AUTH_PASSWORD;SETTINGS_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;SETTINGS_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;SETTINGS_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;SETTINGS_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided SETTINGS_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;SETTINGS_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;SETTINGS_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;SETTINGS_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided SETTINGS_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -5,15 +5,16 @@
|
||||
#
|
||||
# Translators:
|
||||
# Mário Machado, 2025
|
||||
# Andre Nunes, 2026
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-07-01 23:15+0000\n"
|
||||
"POT-Creation-Date: 2026-07-09 23:15+0000\n"
|
||||
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
|
||||
"Last-Translator: Mário Machado, 2025\n"
|
||||
"Last-Translator: Andre Nunes, 2026\n"
|
||||
"Language-Team: Portuguese (https://app.transifex.com/opencloud-eu/teams/204053/pt/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -54,7 +55,7 @@ msgstr "Nunca"
|
||||
#. description of the notification option 'Resource Mention'
|
||||
#: pkg/store/defaults/templates.go:18
|
||||
msgid "Notify on resource mentions"
|
||||
msgstr ""
|
||||
msgstr "Notificar sobre menções a recursos"
|
||||
|
||||
#. description of the notification option 'Space Shared'
|
||||
#: pkg/store/defaults/templates.go:26
|
||||
@@ -113,7 +114,7 @@ msgstr "Removido como membro do espaço"
|
||||
#. name of the notification option 'Resource Mention'
|
||||
#: pkg/store/defaults/templates.go:16
|
||||
msgid "Resource Mention"
|
||||
msgstr ""
|
||||
msgstr "Menção ao recurso"
|
||||
|
||||
#. description of the notification option 'Email Interval'
|
||||
#: pkg/store/defaults/templates.go:50
|
||||
|
||||
@@ -84,7 +84,7 @@ type Cache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE;STORAGE_SYSTEM_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"auth_username" env:"OC_CACHE_AUTH_USERNAME;STORAGE_SYSTEM_CACHE_AUTH_USERNAME" desc:"Username for the configured store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"auth_password" env:"OC_CACHE_AUTH_PASSWORD;STORAGE_SYSTEM_CACHE_AUTH_PASSWORD" desc:"Password for the configured store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;STORAGE_SYSTEM_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;STORAGE_SYSTEM_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_SYSTEM_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_SYSTEM_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;STORAGE_SYSTEM_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;STORAGE_SYSTEM_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_SYSTEM_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_SYSTEM_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -235,9 +235,9 @@ type FilemetadataCache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE;STORAGE_USERS_FILEMETADATA_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_CACHE_AUTH_USERNAME;STORAGE_USERS_FILEMETADATA_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_CACHE_AUTH_PASSWORD;STORAGE_USERS_FILEMETADATA_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;STORAGE_USERS_FILEMETADATA_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;STORAGE_USERS_FILEMETADATA_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_FILEMETADATA_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_USERS_FILEMETADATA_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;STORAGE_USERS_FILEMETADATA_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;STORAGE_USERS_FILEMETADATA_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_FILEMETADATA_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_USERS_FILEMETADATA_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
|
||||
// IDCache holds cache config
|
||||
@@ -249,9 +249,9 @@ type IDCache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OC_CACHE_DISABLE_PERSISTENCE;STORAGE_USERS_ID_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_CACHE_AUTH_USERNAME;STORAGE_USERS_ID_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_CACHE_AUTH_PASSWORD;STORAGE_USERS_ID_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;STORAGE_USERS_ID_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;STORAGE_USERS_ID_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_ID_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_USERS_ID_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_CACHE_ENABLE_TLS;STORAGE_USERS_ID_CACHE_ENABLE_TLS" desc:"Enable TLS for the connection to file metadata cache." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_CACHE_TLS_INSECURE;STORAGE_USERS_ID_CACHE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_ID_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_USERS_ID_CACHE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
|
||||
// EOSDriver is the storage driver configuration when using 'eos' storage driver
|
||||
|
||||
@@ -46,9 +46,9 @@ type Persistence struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OC_PERSISTENT_STORE_TTL;USERLOG_STORE_TTL" desc:"Time to live for events in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OC_PERSISTENT_STORE_AUTH_USERNAME;USERLOG_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OC_PERSISTENT_STORE_AUTH_PASSWORD;USERLOG_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"1.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;USERLOG_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"%%NEXT%%"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;USERLOG_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"%%NEXT%%"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;USERLOG_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided USERLOG_STORE_TLS_INSECURE will be seen as false." introductionVersion:"%%NEXT%%"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OC_PERSISTENT_STORE_ENABLE_TLS;USERLOG_STORE_ENABLE_TLS" desc:"Enable TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_PERSISTENT_STORE_TLS_INSECURE;USERLOG_STORE_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"7.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;USERLOG_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided USERLOG_STORE_TLS_INSECURE will be seen as false." introductionVersion:"7.3.0"`
|
||||
}
|
||||
|
||||
// Events combines the configuration options for the event bus.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SHELL := bash
|
||||
NAME := web
|
||||
WEB_ASSETS_VERSION = v7.2.0-beta.3
|
||||
WEB_ASSETS_VERSION = v7.2.0
|
||||
WEB_ASSETS_BRANCH = main
|
||||
|
||||
ifneq (, $(shell command -v go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
|
||||
|
||||
@@ -56,7 +56,7 @@ type WebConfig struct {
|
||||
Server string `json:"server,omitempty" yaml:"server" env:"OC_URL;WEB_UI_CONFIG_SERVER" desc:"URL, where the OpenCloud APIs are reachable for OpenCloud Web." introductionVersion:"1.0.0"`
|
||||
Theme string `json:"theme,omitempty" yaml:"-"`
|
||||
OpenIDConnect OIDC `json:"openIdConnect,omitempty" yaml:"oidc"`
|
||||
Apps []string `json:"apps" yaml:"apps" env:"WEB_UI_CORE_APPS" desc:"Allows to override the default list of core apps in OpenCloud Web." introductionVersion:"%%NEXT%%"`
|
||||
Apps []string `json:"apps" yaml:"apps" env:"WEB_UI_CORE_APPS" desc:"Allows to override the default list of core apps in OpenCloud Web." introductionVersion:"7.3.0"`
|
||||
Applications []Application `json:"applications,omitempty" yaml:"applications"`
|
||||
ExternalApps []ExternalApp `json:"external_apps,omitempty" yaml:"external_apps"`
|
||||
Options Options `json:"options,omitempty" yaml:"options"`
|
||||
|
||||
@@ -4,7 +4,7 @@ package config
|
||||
type Options struct {
|
||||
AccountEditLink *AccountEditLink `json:"accountEditLink,omitempty" yaml:"accountEditLink"`
|
||||
DisableFeedbackLink bool `json:"disableFeedbackLink,omitempty" yaml:"disableFeedbackLink" env:"WEB_OPTION_DISABLE_FEEDBACK_LINK" desc:"Set this option to 'true' to disable the feedback link in the top bar. Keeping it enabled by setting the value to 'false' or with the absence of the option, allows OpenCloud to get feedback from your user base through a dedicated survey website." introductionVersion:"1.0.0"`
|
||||
DisableSponsorLink bool `json:"disableSponsorLink,omitempty" yaml:"disableSponsorLink" env:"WEB_OPTION_DISABLE_SPONSOR_LINK" desc:"Set this option to 'true' to disable the sponsor link in the left sidebar. Keeping it enabled by setting the value to 'false' or by leaving the option unset allows OpenCloud to get support from the community through a dedicated sponsorship program on GitHub." introductionVersion:"%%NEXT%%"`
|
||||
DisableSponsorLink bool `json:"disableSponsorLink,omitempty" yaml:"disableSponsorLink" env:"WEB_OPTION_DISABLE_SPONSOR_LINK" desc:"Set this option to 'true' to disable the sponsor link in the left sidebar. Keeping it enabled by setting the value to 'false' or by leaving the option unset allows OpenCloud to get support from the community through a dedicated sponsorship program on GitHub." introductionVersion:"7.3.0"`
|
||||
FeedbackLink *FeedbackLink `json:"feedbackLink,omitempty" yaml:"feedbackLink"`
|
||||
RunningOnEOS bool `json:"runningOnEos,omitempty" yaml:"runningOnEos" env:"WEB_OPTION_RUNNING_ON_EOS" desc:"Set this option to 'true' if running on an EOS storage backend (https://eos-web.web.cern.ch/eos-web/) to enable its specific features. Defaults to 'false'." introductionVersion:"1.0.0" deprecationVersion:"6.2.0" removalVersion:"%%NEXT_PRODUCTION_VERSION%%" deprecationInfo:"WEB_OPTION_RUNNING_ON_EOS is deprecated and will be removed in a future release."`
|
||||
CernFeatures bool `json:"cernFeatures,omitempty" yaml:"cernFeatures" deprecationVersion:"6.2.0" removalVersion:"%%NEXT_PRODUCTION_VERSION%%"`
|
||||
@@ -69,6 +69,6 @@ type ConcurrentRequestsShares struct {
|
||||
}
|
||||
|
||||
type OxAppSuite struct {
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled" env:"WEB_OPTION_OX_APP_SUITE_ENABLED" desc:"Enables the OX App Suite. Defaults to false." introductionVersion:"%%NEXT%%"`
|
||||
ApiUrl string `json:"apiUrl,omitempty" yaml:"apiUrl" env:"WEB_OPTION_OX_APP_SUITE_API_URL" desc:"The API URL for the OX App Suite. Defaults to an empty string." introductionVersion:"%%NEXT%%"`
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled" env:"WEB_OPTION_OX_APP_SUITE_ENABLED" desc:"Enables the OX App Suite. Defaults to false." introductionVersion:"7.3.0"`
|
||||
ApiUrl string `json:"apiUrl,omitempty" yaml:"apiUrl" env:"WEB_OPTION_OX_APP_SUITE_API_URL" desc:"The API URL for the OX App Suite. Defaults to an empty string." introductionVersion:"7.3.0"`
|
||||
}
|
||||
@@ -29,6 +29,8 @@ use Psr\Http\Message\ResponseInterface;
|
||||
use splitbrain\PHPArchive\Tar;
|
||||
use splitbrain\PHPArchive\Zip;
|
||||
use splitbrain\PHPArchive\Archive;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -133,7 +135,6 @@ class ArchiverContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" downloads the (zip|tar) archive of "([^"]*)" using the resource (id|ids|path|paths) and setting these headers:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $archiveType
|
||||
@@ -146,6 +147,7 @@ class ArchiverContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" downloads the (zip|tar) archive of "([^"]*)" using the resource (id|ids|path|paths) and setting these headers:$/')]
|
||||
public function userDownloadsTheZipOrTarArchiveOfResourceUsingResourceIdOrPathAndSettingTheseHeaders(
|
||||
string $user,
|
||||
string $archiveType,
|
||||
@@ -167,7 +169,6 @@ class ArchiverContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :downloader downloads the archive of :item of user :owner using the resource :addressType
|
||||
*
|
||||
* @param string $downloader Who sends the request
|
||||
* @param string $resource
|
||||
@@ -179,6 +180,7 @@ class ArchiverContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :downloader downloads the archive of :item of user :owner using the resource :addressType')]
|
||||
public function userDownloadsTheArchiveOfItemOfUser(
|
||||
string $downloader,
|
||||
string $resource,
|
||||
@@ -224,7 +226,6 @@ class ArchiverContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user downloads the archive of these items using the resource :addressType
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $addressType ids|paths
|
||||
@@ -234,6 +235,7 @@ class ArchiverContext implements Context {
|
||||
*
|
||||
* @throws GuzzleException|Exception
|
||||
*/
|
||||
#[When('user :user downloads the archive of these items using the resource :addressType')]
|
||||
public function userDownloadsTheArchiveOfTheseItems(
|
||||
string $user,
|
||||
string $addressType,
|
||||
@@ -257,7 +259,6 @@ class ArchiverContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the downloaded :type archive should contain these files:
|
||||
*
|
||||
* @param string $type
|
||||
* @param TableNode $expectedFiles
|
||||
@@ -266,6 +267,7 @@ class ArchiverContext implements Context {
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the downloaded :type archive should contain these files:')]
|
||||
public function theDownloadedArchiveShouldContainTheseFiles(string $type, TableNode $expectedFiles): void {
|
||||
$this->featureContext->verifyTableNodeColumns($expectedFiles, ['name', 'content']);
|
||||
$contents = $this->featureContext->getResponse()->getBody()->getContents();
|
||||
|
||||
@@ -22,6 +22,8 @@ use Behat\Behat\Context\Context;
|
||||
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
|
||||
use TestHelpers\BehatHelper;
|
||||
use TestHelpers\AuthAppHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -46,13 +48,13 @@ class AuthAppContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user creates app token with expiration time :expiration using the auth-app API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $expiration
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user creates app token with expiration time :expiration using the auth-app API')]
|
||||
public function userCreatesAppTokenWithExpirationTimeUsingTheAuthAppApi(string $user, string $expiration): void {
|
||||
$this->featureContext->setResponse(
|
||||
AuthAppHelper::createAppAuthToken(
|
||||
@@ -65,13 +67,13 @@ class AuthAppContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has created app token with expiration time :expiration using the auth-app API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $expiration
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('user :user has created app token with expiration time :expiration using the auth-app API')]
|
||||
public function userHasCreatedAppTokenWithExpirationTime(string $user, string $expiration): void {
|
||||
$response = AuthAppHelper::createAppAuthToken(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
@@ -83,12 +85,12 @@ class AuthAppContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user lists all created tokens using the auth-app API
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user lists all created tokens using the auth-app API')]
|
||||
public function userListsAllCreatedTokensUsingTheAuthAppApi(string $user): void {
|
||||
$this->featureContext->setResponse(
|
||||
AuthAppHelper::listAllAppAuthTokensForUser(
|
||||
@@ -100,13 +102,13 @@ class AuthAppContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the administrator has created app token for user :impersonatedUser with expiration time :expiration using the auth-app API
|
||||
*
|
||||
* @param string $impersonatedUser
|
||||
* @param string $expiration
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('the administrator has created app token for user :impersonatedUser with expiration time :expiration using the auth-app API')]
|
||||
public function theAdministratorHasCreatedAppTokenWithExpirationTimeImpersonatingUserUsingTheAuthAppApi(
|
||||
string $impersonatedUser,
|
||||
string $expiration,
|
||||
@@ -129,13 +131,13 @@ class AuthAppContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator creates app token for user :impersonatedUser with expiration time :expiration using the auth-app API
|
||||
*
|
||||
* @param string $impersonatedUser
|
||||
* @param string $expiration
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator creates app token for user :impersonatedUser with expiration time :expiration using the auth-app API')]
|
||||
public function theAdministratorCreatesAppTokenForUserWithExpirationTimeViaAuthAppApi(
|
||||
string $impersonatedUser,
|
||||
string $expiration,
|
||||
|
||||
@@ -27,6 +27,7 @@ use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use TestHelpers\TokenHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use Behat\Step\When;
|
||||
|
||||
/**
|
||||
* Authentication functions
|
||||
@@ -135,19 +136,18 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When a user requests :url with :method and no authentication
|
||||
*
|
||||
* @param string $url
|
||||
* @param string $method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('a user requests :url with :method and no authentication')]
|
||||
public function userRequestsURLWithNoAuth(string $url, string $method): void {
|
||||
$this->featureContext->setResponse($this->sendRequest($url, $method));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When a user requests these endpoints with :method with body :body and no authentication about user :user
|
||||
*
|
||||
* @param string $method
|
||||
* @param string $body
|
||||
@@ -157,6 +157,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('a user requests these endpoints with :method with body :body and no authentication about user :user')]
|
||||
public function userRequestsEndpointsWithBodyAndNoAuthThenStatusCodeAboutUser(
|
||||
string $method,
|
||||
string $body,
|
||||
@@ -177,7 +178,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When a user requests these endpoints with :method with no authentication about user :user
|
||||
*
|
||||
* @param string $method
|
||||
* @param string $ofUser
|
||||
@@ -186,6 +186,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('a user requests these endpoints with :method with no authentication about user :user')]
|
||||
public function userRequestsEndpointsWithoutBodyAndNoAuthAboutUser(
|
||||
string $method,
|
||||
string $ofUser,
|
||||
@@ -205,7 +206,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When a user requests these endpoints with :method and no authentication
|
||||
*
|
||||
* @param string $method
|
||||
* @param TableNode $table
|
||||
@@ -213,6 +213,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('a user requests these endpoints with :method and no authentication')]
|
||||
public function userRequestsEndpointsWithNoAuthentication(string $method, TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['endpoint']);
|
||||
foreach ($table->getHash() as $row) {
|
||||
@@ -227,7 +228,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When a user requests these URLs with :method and no authentication
|
||||
*
|
||||
* @param $method
|
||||
* @param TableNode $table
|
||||
@@ -235,6 +235,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('a user requests these URLs with :method and no authentication')]
|
||||
public function aUserRequestsTheseUrlsWithAndNoAuthentication($method, TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['endpoint'], ['service']);
|
||||
foreach ($table->getHash() as $row) {
|
||||
@@ -250,7 +251,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the user :user requests these endpoints with :method with basic auth
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $method
|
||||
@@ -259,6 +259,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('the user :user requests these endpoints with :method with basic auth')]
|
||||
public function userRequestsEndpointsWithBasicAuth(string $user, string $method, TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['endpoint']);
|
||||
foreach ($table->getHash() as $row) {
|
||||
@@ -269,7 +270,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" requests these endpoints with "([^"]*)" to (?:get|set) property "([^"]*)" about user "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $method
|
||||
@@ -280,6 +280,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" requests these endpoints with "([^"]*)" to (?:get|set) property "([^"]*)" about user "([^"]*)"$/')]
|
||||
public function theUserRequestsTheseEndpointsToGetOrSetPropertyAboutUser(
|
||||
string $user,
|
||||
string $method,
|
||||
@@ -301,7 +302,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator requests these endpoints with :method
|
||||
*
|
||||
* @param string $method
|
||||
* @param TableNode $table
|
||||
@@ -309,6 +309,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('the administrator requests these endpoints with :method')]
|
||||
public function theAdminRequestsTheseEndpointsWithMethod(string $method, TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['endpoint']);
|
||||
foreach ($table->getHash() as $row) {
|
||||
@@ -323,7 +324,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user requests :url with :method using basic auth
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $url
|
||||
@@ -331,6 +331,7 @@ class AuthContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user requests :url with :method using basic auth')]
|
||||
public function userRequestsURLUsingBasicAuth(
|
||||
string $user,
|
||||
string $url,
|
||||
@@ -341,7 +342,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user requests :url with :method using basic auth and with headers
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $url
|
||||
@@ -351,6 +351,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user requests :url with :method using basic auth and with headers')]
|
||||
public function userRequestsURLWithUsingBasicAuthAndDepthHeader(
|
||||
string $user,
|
||||
string $url,
|
||||
@@ -382,7 +383,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user requests these endpoints with :method using password :password
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $method
|
||||
@@ -392,6 +392,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user requests these endpoints with :method using password :password')]
|
||||
public function userRequestsTheseEndpointsWithPassword(
|
||||
string $user,
|
||||
string $method,
|
||||
@@ -411,7 +412,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user requests these endpoints with :method using password :password about user :ofUser
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $method
|
||||
@@ -422,6 +422,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user requests these endpoints with :method using password :password about user :ofUser')]
|
||||
public function userRequestsTheseEndpointsUsingPasswordAboutUser(
|
||||
string $user,
|
||||
string $method,
|
||||
@@ -460,7 +461,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user requests these endpoints with :method including body :body using password :password about user :ofUser
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $method
|
||||
@@ -472,6 +472,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user requests these endpoints with :method including body :body using password :password about user :ofUser')]
|
||||
public function userRequestsTheseEndpointsWithBodyUsingPasswordAboutUser(
|
||||
string $user,
|
||||
string $method,
|
||||
@@ -511,7 +512,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user requests these endpoints with :method including body :body about user :ofUser
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $method
|
||||
@@ -522,6 +522,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user requests these endpoints with :method including body :body about user :ofUser')]
|
||||
public function userRequestsTheseEndpointsIncludingBodyAboutUser(
|
||||
string $user,
|
||||
string $method,
|
||||
@@ -556,7 +557,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :asUser requests these endpoints with :method using the password of user :ofUser
|
||||
*
|
||||
* @param string $asUser
|
||||
* @param string $method
|
||||
@@ -566,6 +566,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :asUser requests these endpoints with :method using the password of user :ofUser')]
|
||||
public function userRequestsTheseEndpointsWithoutBodyUsingThePasswordOfUser(
|
||||
string $asUser,
|
||||
string $method,
|
||||
@@ -596,7 +597,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :asUser requests these endpoints with :method including body :body using the password of user :user
|
||||
*
|
||||
* @param string $asUser
|
||||
* @param string $method
|
||||
@@ -607,6 +607,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('user :asUser requests these endpoints with :method including body :body using the password of user :user')]
|
||||
public function userRequestsTheseEndpointsIncludingBodyUsingPasswordOfUser(
|
||||
string $asUser,
|
||||
string $method,
|
||||
@@ -638,7 +639,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user requests these endpoints with :method about user :ofUser
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $method
|
||||
@@ -648,6 +648,7 @@ class AuthContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user requests these endpoints with :method about user :ofUser')]
|
||||
public function userRequestsTheseEndpointsAboutUser(
|
||||
string $user,
|
||||
string $method,
|
||||
@@ -683,7 +684,6 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user requests :endpoint with :method without retrying
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $endpoint
|
||||
@@ -691,6 +691,7 @@ class AuthContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user requests :endpoint with :method without retrying')]
|
||||
public function userRequestsURLWithoutRetry(
|
||||
string $user,
|
||||
string $endpoint,
|
||||
@@ -717,13 +718,13 @@ class AuthContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user should not be able to log in with wrong password :password
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user should not be able to log in with wrong password :password')]
|
||||
public function userShouldNotBeAbleToLogInWithWrongPassword(
|
||||
string $user,
|
||||
string $password
|
||||
|
||||
@@ -28,6 +28,8 @@ use PHPUnit\Framework\Assert;
|
||||
use TestHelpers\OcsApiHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -133,7 +135,6 @@ class CapabilitiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :username retrieves the capabilities using the capabilities API
|
||||
*
|
||||
* @param string $username
|
||||
*
|
||||
@@ -141,27 +142,28 @@ class CapabilitiesContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('user :username retrieves the capabilities using the capabilities API')]
|
||||
public function userRetrievesCapabilities(string $username): void {
|
||||
$user = $this->featureContext->getActualUsername($username);
|
||||
$this->featureContext->setResponse($this->userGetsCapabilities($user, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator retrieves the capabilities using the capabilities API
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator retrieves the capabilities using the capabilities API')]
|
||||
public function theAdministratorGetsCapabilities(): void {
|
||||
$user = $this->getAdminUsernameForCapabilitiesCheck();
|
||||
$this->featureContext->setResponse($this->userGetsCapabilities($user, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the major-minor-micro version data in the response should match the version string
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the major-minor-micro version data in the response should match the version string')]
|
||||
public function checkVersionMajorMinorMicroResponse(): void {
|
||||
$jsonResponse = $this->featureContext->getJsonDecodedResponseBodyContent();
|
||||
$versionData = $jsonResponse->ocs->data->version;
|
||||
@@ -199,13 +201,13 @@ class CapabilitiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the status.php response should include
|
||||
*
|
||||
* @param PyStringNode $jsonExpected
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the status.php response should include')]
|
||||
public function statusPhpRespondedShouldMatch(PyStringNode $jsonExpected): void {
|
||||
$jsonExpectedDecoded = \json_decode($jsonExpected->getRaw(), true);
|
||||
$jsonRespondedDecoded = $this->featureContext->getJsonDecodedResponse();
|
||||
|
||||
@@ -26,6 +26,9 @@ use Psr\Http\Message\ResponseInterface;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use TestHelpers\UploadHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -62,7 +65,6 @@ class ChecksumContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user uploads file :source to :destination with checksum :checksum using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
@@ -71,6 +73,7 @@ class ChecksumContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user uploads file :source to :destination with checksum :checksum using the WebDAV API')]
|
||||
public function userUploadsFileToWithChecksumUsingTheAPI(
|
||||
string $user,
|
||||
string $source,
|
||||
@@ -83,7 +86,6 @@ class ChecksumContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has uploaded file :source to :destination with checksum :checksum
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
@@ -92,6 +94,7 @@ class ChecksumContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('user :user has uploaded file :source to :destination with checksum :checksum')]
|
||||
public function userHasUploadedFileToWithChecksumUsingTheAPI(
|
||||
string $user,
|
||||
string $source,
|
||||
@@ -132,7 +135,6 @@ class ChecksumContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has uploaded file with content :content and checksum :checksum to :destination
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $content
|
||||
@@ -141,6 +143,7 @@ class ChecksumContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('user :user has uploaded file with content :content and checksum :checksum to :destination')]
|
||||
public function userHasUploadedFileWithContentAndChecksumToUsingTheAPI(
|
||||
string $user,
|
||||
string $content,
|
||||
@@ -153,13 +156,13 @@ class ChecksumContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user requests the checksum of :path via propfind
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user requests the checksum of :path via propfind')]
|
||||
public function userRequestsTheChecksumOfViaPropfind(string $user, string $path): void {
|
||||
$this->featureContext->setResponse($this->propfindResourceChecksum($user, $path));
|
||||
}
|
||||
@@ -195,20 +198,19 @@ class ChecksumContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the webdav checksum should match :expectedChecksum
|
||||
*
|
||||
* @param string $expectedChecksum
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the webdav checksum should match :expectedChecksum')]
|
||||
public function theWebdavChecksumShouldMatch(string $expectedChecksum): void {
|
||||
$bodyContents = $this->featureContext->getResponse()->getBody()->getContents();
|
||||
$this->validateChecksum($bodyContents, $expectedChecksum);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then as user :user the webdav checksum of :path via propfind should match :expectedChecksum
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -217,6 +219,7 @@ class ChecksumContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('as user :user the webdav checksum of :path via propfind should match :expectedChecksum')]
|
||||
public function asUserTheWebdavChecksumOfPathViaPropfindShouldMatch(
|
||||
string $user,
|
||||
string $path,
|
||||
@@ -321,13 +324,13 @@ class ChecksumContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the header checksum should match :expectedChecksum
|
||||
*
|
||||
* @param string $expectedChecksum
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the header checksum should match :expectedChecksum')]
|
||||
public function theHeaderChecksumShouldMatch(string $expectedChecksum): void {
|
||||
$headerChecksums
|
||||
= $this->featureContext->getResponse()->getHeader('OC-Checksum');
|
||||
@@ -359,7 +362,6 @@ class ChecksumContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the header checksum when user :arg1 downloads file :arg2 using the WebDAV API should match :arg3
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileName
|
||||
@@ -368,6 +370,7 @@ class ChecksumContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the header checksum when user :arg1 downloads file :arg2 using the WebDAV API should match :arg3')]
|
||||
public function theHeaderChecksumWhenUserDownloadsFileUsingTheWebdavApiShouldMatch(
|
||||
string $user,
|
||||
string $fileName,
|
||||
@@ -433,7 +436,6 @@ class ChecksumContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user uploads chunk file :num of :total with :data to :destination with checksum :expectedChecksum using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param int $num
|
||||
@@ -444,6 +446,7 @@ class ChecksumContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user uploads chunk file :num of :total with :data to :destination with checksum :expectedChecksum using the WebDAV API')]
|
||||
public function userUploadsChunkFileOfWithToWithChecksum(
|
||||
string $user,
|
||||
int $num,
|
||||
@@ -464,7 +467,6 @@ class ChecksumContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has uploaded chunk file :num of :total with :data to :destination with checksum :expectedChecksum
|
||||
*
|
||||
* @param string $user
|
||||
* @param int $num
|
||||
@@ -475,6 +477,7 @@ class ChecksumContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('user :user has uploaded chunk file :num of :total with :data to :destination with checksum :expectedChecksum')]
|
||||
public function userHasUploadedChunkFileOfWithToWithChecksum(
|
||||
string $user,
|
||||
int $num,
|
||||
|
||||
@@ -26,6 +26,9 @@ use TestHelpers\CliHelper;
|
||||
use TestHelpers\OcConfigHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
/**
|
||||
* CLI context
|
||||
@@ -120,27 +123,26 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the administrator has stopped the server
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('the administrator has stopped the server')]
|
||||
public function theAdministratorHasStoppedTheServer(): void {
|
||||
$response = OcConfigHelper::stopOpencloud();
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^the administrator (?:starts|has started) the server$/
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('/^the administrator (?:starts|has started) the server$/')]
|
||||
public function theAdministratorHasStartedTheServer(): void {
|
||||
$response = OcConfigHelper::startOpencloud();
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the administrator resets the password of (non-existing|existing) user "([^"]*)" to "([^"]*)" using the CLI$/
|
||||
*
|
||||
* @param string $status
|
||||
* @param string $user
|
||||
@@ -148,6 +150,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^the administrator resets the password of (non-existing|existing) user "([^"]*)" to "([^"]*)" using the CLI$/')]
|
||||
public function theAdministratorResetsThePasswordOfUserUsingTheCLI(
|
||||
string $status,
|
||||
string $user,
|
||||
@@ -167,10 +170,10 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator deletes the empty trashbin folders using the CLI
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator deletes the empty trashbin folders using the CLI')]
|
||||
public function theAdministratorDeletesEmptyTrashbinFoldersUsingTheCli(): void {
|
||||
$path = $this->featureContext->getStorageUsersRoot();
|
||||
$command = "trash purge-empty-dirs -p $path --dry-run=false";
|
||||
@@ -181,10 +184,10 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator checks the backup consistency using the CLI
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator checks the backup consistency using the CLI')]
|
||||
public function theAdministratorChecksTheBackupConsistencyUsingTheCli(): void {
|
||||
$path = $this->featureContext->getStorageUsersRoot();
|
||||
$command = "backup consistency -p $path";
|
||||
@@ -195,13 +198,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator creates app token for user :user with expiration time :expirationTime using the auth-app CLI
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $expirationTime
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator creates app token for user :user with expiration time :expirationTime using the auth-app CLI')]
|
||||
public function theAdministratorCreatesAppTokenForUserWithExpirationTimeUsingTheAuthAppCLI(
|
||||
string $user,
|
||||
string $expirationTime
|
||||
@@ -215,13 +218,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has created app token with expiration time :expirationTime using the auth-app CLI
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $expirationTime
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('user :user has created app token with expiration time :expirationTime using the auth-app CLI')]
|
||||
public function userHasCreatedAppTokenWithExpirationTimeUsingTheAuthAppCLI(
|
||||
string $user,
|
||||
string $expirationTime
|
||||
@@ -244,10 +247,10 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator removes all the file versions using the CLI
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator removes all the file versions using the CLI')]
|
||||
public function theAdministratorRemovesAllVersionsOfResources() {
|
||||
$path = $this->featureContext->getStorageUsersRoot();
|
||||
$command = "revisions purge -p $path --dry-run=false";
|
||||
@@ -258,7 +261,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator removes the versions of file :file of user :user from space :space using the CLI
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $user
|
||||
@@ -266,6 +268,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator removes the versions of file :file of user :user from space :space using the CLI')]
|
||||
public function theAdministratorRemovesTheVersionsOfFileUsingFileId($file, $user, $space) {
|
||||
$path = $this->featureContext->getStorageUsersRoot();
|
||||
$fileId = $this->spacesContext->getFileId($user, $space, $file);
|
||||
@@ -277,10 +280,10 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the administrator reindexes all spaces using the CLI$/
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator reindexes all spaces using the CLI')]
|
||||
public function theAdministratorReindexesAllSpacesUsingTheCli(): void {
|
||||
$endpoint = $this->featureContext->getBaseUrlHostName();
|
||||
$command = "search index --all-spaces --endpoint $endpoint:9220 --insecure";
|
||||
@@ -291,12 +294,12 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the administrator reindexes a space "([^"]*)" using the CLI$/
|
||||
*
|
||||
* @param string $spaceName
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator reindexes a space :spaceName using the CLI')]
|
||||
public function theAdministratorReindexesASpaceUsingTheCli(string $spaceName): void {
|
||||
$spaceId = $this->spacesContext->getSpaceIdByName($this->featureContext->getAdminUsername(), $spaceName);
|
||||
$endpoint = $this->featureContext->getBaseUrlHostName();
|
||||
@@ -308,12 +311,12 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator removes the file versions of space :space using the CLI
|
||||
*
|
||||
* @param string $space
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator removes the file versions of space :space using the CLI')]
|
||||
public function theAdministratorRemovesTheVersionsOfFilesInSpaceUsingSpaceId(string $space): void {
|
||||
$path = $this->featureContext->getStorageUsersRoot();
|
||||
$adminUsername = $this->featureContext->getAdminUsername();
|
||||
@@ -326,10 +329,10 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator purges the expired trash-bin items using the CLI
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator purges the expired trash-bin items using the CLI')]
|
||||
public function theAdministratorPurgesExpiredTrashBinItemsUsingTheCli(): void {
|
||||
$command = "storage-users trash-bin purge-expired";
|
||||
$body = [
|
||||
@@ -340,12 +343,12 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator lists the trash-bin items of space :space using the CLI
|
||||
*
|
||||
* @param string $space
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator lists the trash-bin items of space :space using the CLI')]
|
||||
public function theAdministratorListsTrashBinItemsOfSpaceUsingTheCli(string $space): void {
|
||||
$adminUsername = $this->featureContext->getAdminUsername();
|
||||
$spaceId = $this->spacesContext->getSpaceIdByName($adminUsername, $space);
|
||||
@@ -357,12 +360,12 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator lists the trash-bin items of the personal space of user :user using the CLI
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator lists the trash-bin items of the personal space of user :user using the CLI')]
|
||||
public function theAdministratorListsTrashBinItemsOfPersonalSpaceUsingTheCli(string $user): void {
|
||||
$spaceId = $this->spacesContext->getSpaceIdByName($user, 'Personal');
|
||||
$command = "storage-users trash-bin list $spaceId";
|
||||
@@ -373,12 +376,12 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator restores all the trash-bin items of space :space using the CLI
|
||||
*
|
||||
* @param string $space
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator restores all the trash-bin items of space :space using the CLI')]
|
||||
public function theAdministratorRestoresAllTrashBinItemsOfSpaceUsingTheCli(string $space): void {
|
||||
$adminUsername = $this->featureContext->getAdminUsername();
|
||||
$spaceId = $this->spacesContext->getSpaceIdByName($adminUsername, $space);
|
||||
@@ -390,12 +393,12 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator restores all the trash-bin items of the personal space of user :user using the CLI
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator restores all the trash-bin items of the personal space of user :user using the CLI')]
|
||||
public function theAdministratorRestoresAllTrashBinItemsOfPersonalSpaceUsingTheCli(string $user): void {
|
||||
$spaceId = $this->spacesContext->getSpaceIdByName($user, 'Personal');
|
||||
$command = "storage-users trash-bin restore-all $spaceId --yes";
|
||||
@@ -406,13 +409,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator restores the trash-bin item with file-id :fileId of space :space using the CLI
|
||||
*
|
||||
* @param string $fileId
|
||||
* @param string $space
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator restores the trash-bin item with file-id :fileId of space :space using the CLI')]
|
||||
public function theAdministratorRestoresTrashBinItemOfSpaceUsingTheCli(string $fileId, string $space): void {
|
||||
$adminUsername = $this->featureContext->getAdminUsername();
|
||||
$spaceId = $this->spacesContext->getSpaceIdByName($adminUsername, $space);
|
||||
@@ -424,13 +427,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator restores the trash-bin item with file-id :fileId of the personal space of user :user using the CLI
|
||||
*
|
||||
* @param string $fileId
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator restores the trash-bin item with file-id :fileId of the personal space of user :user using the CLI')]
|
||||
public function theAdministratorRestoresTrashBinItemOfPersonalSpaceUsingTheCli(string $fileId, string $user): void {
|
||||
$spaceId = $this->spacesContext->getSpaceIdByName($user, 'Personal');
|
||||
$command = "storage-users trash-bin restore $spaceId $fileId";
|
||||
@@ -441,10 +444,10 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator cleans up orphaned shares using the CLI
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator cleans up orphaned shares using the CLI')]
|
||||
public function theAdministratorCleansUpOrphanedSharesUsingTheCli(): void {
|
||||
$serviceAccountId = getenv('OC_SERVICE_ACCOUNT_ID') ?: 'service-account-id';
|
||||
$serviceAccountSecret = getenv('OC_SERVICE_ACCOUNT_SECRET') ?: 'service-account-secret';
|
||||
@@ -457,10 +460,10 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator lists the unified roles using the CLI
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator lists the unified roles using the CLI')]
|
||||
public function theAdministratorListsTheUnifiedRolesUsingTheCli(): void {
|
||||
$command = "graph list-unified-roles";
|
||||
$body = [
|
||||
@@ -470,10 +473,10 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the command should be successful
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the command should be successful')]
|
||||
public function theCommandShouldBeSuccessful(): void {
|
||||
$response = $this->featureContext->getResponse();
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
|
||||
@@ -490,13 +493,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the command output (should|should not) contain "([^"]*)"$/
|
||||
*
|
||||
* @param string $shouldOrNot
|
||||
* @param string $output
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('/^the command output (should|should not) contain "([^"]*)"$/')]
|
||||
public function theCommandOutputShouldContain(string $shouldOrNot, string $output): void {
|
||||
$response = $this->featureContext->getResponse();
|
||||
$jsonResponse = $this->featureContext->getJsonDecodedResponse($response);
|
||||
@@ -510,13 +513,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator lists all the upload sessions
|
||||
* @When the administrator lists all the upload sessions with flag :flag
|
||||
*
|
||||
* @param string|null $flag
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator lists all the upload sessions')]
|
||||
#[When('the administrator lists all the upload sessions with flag :flag')]
|
||||
public function theAdministratorListsAllTheUploadSessions(?string $flag = null): void {
|
||||
if ($flag) {
|
||||
$flag = "--$flag";
|
||||
@@ -529,12 +532,12 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator cleans upload sessions with the following flags:
|
||||
*
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator cleans upload sessions with the following flags:')]
|
||||
public function theAdministratorCleansUploadSessionsWithTheFollowingFlags(TableNode $table): void {
|
||||
$flag = "";
|
||||
foreach ($table->getRows() as $row) {
|
||||
@@ -549,10 +552,10 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator restarts the upload sessions that are in postprocessing
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator restarts the upload sessions that are in postprocessing')]
|
||||
public function theAdministratorRestartsTheUploadSessionsThatAreInPostprocessing(): void {
|
||||
$command = "storage-users uploads sessions --processing --restart --json";
|
||||
$body = [
|
||||
@@ -562,13 +565,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator restarts the upload sessions of file :file
|
||||
*
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('the administrator restarts the upload sessions of file :file')]
|
||||
public function theAdministratorRestartsUploadSessionsOfFile(string $file): void {
|
||||
$response = CliHelper::runCommand(["command" => "storage-users uploads sessions --json"]);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
|
||||
@@ -588,7 +591,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the CLI response (should|should not) contain these entries:$/
|
||||
*
|
||||
* @param string $shouldOrNot
|
||||
* @param TableNode $table
|
||||
@@ -596,6 +598,7 @@ class CliContext implements Context {
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[Then('/^the CLI response (should|should not) contain these entries:$/')]
|
||||
public function theCLIResponseShouldContainTheseEntries(string $shouldOrNot, TableNode $table): void {
|
||||
$expectedFiles = $table->getColumn(0);
|
||||
$responseArray = $this->getJSONDecodedCliMessage($this->featureContext->getResponse());
|
||||
@@ -655,13 +658,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator creates the folder :folder for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $folder
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator creates the folder :folder for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorCreatesFolder(string $folder, string $user): void {
|
||||
$userUuid = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$storagePath = $this->getUsersStoragePath();
|
||||
@@ -677,12 +680,12 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator lists the content of the POSIX storage folder of user :user
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator lists the content of the POSIX storage folder of user :user')]
|
||||
public function theAdministratorCheckUsersFolder(string $user): void {
|
||||
$userUuid = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$storagePath = $this->getUsersStoragePath();
|
||||
@@ -694,7 +697,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator creates the file :file with content :content for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $content
|
||||
@@ -702,6 +704,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator creates the file :file with content :content for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorCreatesFile(string $file, string $content, string $user): void {
|
||||
$userUuid = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$storagePath = $this->getUsersStoragePath();
|
||||
@@ -717,7 +720,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator has created the file :file with content :content for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $content
|
||||
@@ -725,13 +727,13 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator has created the file :file with content :content for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorHasCreatedFile(string $file, string $content, string $user): void {
|
||||
$this->theAdministratorCreatesFile($file, $content, $user);
|
||||
$this->theCommandShouldBeSuccessful();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator creates the file :file with size :size for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $size Example: "1gb", "5gb"
|
||||
@@ -739,6 +741,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator creates the file :file with size :size for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorCreatesLargeFileWithSize(string $file, string $size, string $user): void {
|
||||
$userUuid = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$storagePath = $this->getUsersStoragePath();
|
||||
@@ -762,7 +765,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator creates :count files sequentially in the directory :dir for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param int $count
|
||||
* @param string $dir
|
||||
@@ -770,6 +772,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator creates :count files sequentially in the directory :dir for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorCreatesFilesSequentially(int $count, string $dir, string $user): void {
|
||||
$userUuid = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$storagePath = $this->getUsersStoragePath() . "/$userUuid/$dir";
|
||||
@@ -787,7 +790,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator creates :count files in parallel in the directory :dir for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param int $count
|
||||
* @param string $dir
|
||||
@@ -795,6 +797,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator creates :count files in parallel in the directory :dir for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorCreatesFilesInParallel(int $count, string $dir, string $user): void {
|
||||
$userUuid = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$storagePath = $this->getUsersStoragePath() . "/$userUuid/$dir";
|
||||
@@ -813,7 +816,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator puts the content :content into the file :file in the POSIX storage folder of user :user
|
||||
*
|
||||
* @param string $content
|
||||
* @param string $file
|
||||
@@ -821,6 +823,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator puts the content :content into the file :file in the POSIX storage folder of user :user')]
|
||||
public function theAdministratorChangesFileContent(string $content, string $file, string $user): void {
|
||||
// this downloads the file using WebDAV and by that checks if it's still in
|
||||
// postprocessing. So its effectively a check for finished postprocessing
|
||||
@@ -838,13 +841,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator reads the content of the file :file in the POSIX storage folder of user :user
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator reads the content of the file :file in the POSIX storage folder of user :user')]
|
||||
public function theAdministratorReadsTheFileContent(string $user, string $file): void {
|
||||
// this downloads the file using WebDAV and by that checks if it's still in
|
||||
// postprocessing. So its effectively a check for finished postprocessing
|
||||
@@ -860,7 +863,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator copies the file :file to the folder :folder for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -868,6 +870,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator copies the file :file to the folder :folder for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorCopiesFileToFolder(string $user, string $file, string $folder): void {
|
||||
// this downloads the file using WebDAV and by that checks if it's still in
|
||||
// postprocessing. So its effectively a check for finished postprocessing
|
||||
@@ -888,7 +891,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator renames the file :file to :newName for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -896,6 +898,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator renames the file :file to :newName for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorRenamesFile(string $user, string $file, string $newName): void {
|
||||
// this downloads the file using WebDAV and by that checks if it's still in
|
||||
// postprocessing. So its effectively a check for finished postprocessing
|
||||
@@ -916,7 +919,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator moves the file :file to the folder :folder for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -924,6 +926,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator moves the file :file to the folder :folder for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorMovesFileToFolder(string $user, string $file, string $folder): void {
|
||||
// this downloads the file using WebDAV and by that checks if it's still in
|
||||
// postprocessing. So its effectively a check for finished postprocessing
|
||||
@@ -944,13 +947,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator deletes the file :file for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator deletes the file :file for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorDeletesFile(string $file, string $user): void {
|
||||
$userUuid = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$storagePath = $this->getUsersStoragePath();
|
||||
@@ -964,13 +967,13 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator deletes the folder :folder for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $folder
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator deletes the folder :folder for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorDeletesFolder(string $folder, string $user): void {
|
||||
$userUuid = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$storagePath = $this->getUsersStoragePath();
|
||||
@@ -984,7 +987,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator copies the file :file to the space :space for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -992,6 +994,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator copies the file :file to the space :space for user :user on the POSIX filesystem')]
|
||||
public function theAdministratorCopiesFileToSpace(string $user, string $file, string $space): void {
|
||||
// this downloads the file using WebDAV and by that checks if it's still in
|
||||
// postprocessing. So its effectively a check for finished postprocessing
|
||||
@@ -1015,27 +1018,6 @@ class CliContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator deletes the project space :space on the POSIX filesystem
|
||||
*
|
||||
* @param string $space
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function theAdministratorDeletesSpace(string $space): void {
|
||||
$projectsStoragePath = $this->getProjectsStoragePath();
|
||||
$spaceId = $this->spacesContext->getSpaceIdByName($this->featureContext->getAdminUsername(), $space);
|
||||
$spaceId = explode('$', $spaceId)[1];
|
||||
|
||||
$body = [
|
||||
"command" => "rm -r $projectsStoragePath/$spaceId",
|
||||
"raw" => true
|
||||
];
|
||||
$this->featureContext->setResponse(CliHelper::runCommand($body));
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator checks the attribute :attribute of file :file for user :user on the POSIX filesystem
|
||||
*
|
||||
* @param string $attribute
|
||||
* @param string $file
|
||||
@@ -1043,6 +1025,7 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator checks the attribute :attribute of file :file for user :user on the POSIX filesystem')]
|
||||
public function theAdminChecksTheAttributeOfFileForUser(string $attribute, string $file, string $user): void {
|
||||
// this downloads the file using WebDAV and by that checks if it's still in
|
||||
// postprocessing. So its effectively a check for finished postprocessing
|
||||
|
||||
@@ -27,6 +27,9 @@ use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\CollaborationHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
/**
|
||||
* steps needed to re-configure OpenCloud server
|
||||
@@ -71,8 +74,6 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user checks the information of file :file of space :space using office :app
|
||||
* @When user :user checks the information of file :file of space :space using office :app with view mode :view
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -84,6 +85,8 @@ class CollaborationContext implements Context {
|
||||
*
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user checks the information of file :file of space :space using office :app')]
|
||||
#[When('user :user checks the information of file :file of space :space using office :app with view mode :view')]
|
||||
public function userChecksTheInformationOfFileOfSpaceUsingOffice(
|
||||
string $user,
|
||||
string $file,
|
||||
@@ -120,8 +123,6 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user creates a file :file inside folder :folder in space :space using wopi endpoint
|
||||
* @When user :user tries to create a file :file inside folder :folder in space :space using wopi endpoint
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -131,6 +132,8 @@ class CollaborationContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user creates a file :file inside folder :folder in space :space using wopi endpoint')]
|
||||
#[When('user :user tries to create a file :file inside folder :folder in space :space using wopi endpoint')]
|
||||
public function userCreatesFileInsideFolderInSpaceUsingWopiEndpoint(
|
||||
string $user,
|
||||
string $file,
|
||||
@@ -193,8 +196,6 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public creates a file :file inside the last shared public link folder with password :password using wopi endpoint
|
||||
* @When the public tries to create a file :file inside the last shared public link folder with password :password using wopi endpoint
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $password
|
||||
@@ -202,6 +203,8 @@ class CollaborationContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('the public creates a file :file inside the last shared public link folder with password :password using wopi endpoint')]
|
||||
#[When('the public tries to create a file :file inside the last shared public link folder with password :password using wopi endpoint')]
|
||||
public function thePublicCreatesAFileInsideTheLastSharedPublicLinkFolderWithPasswordUsingWopiEndpoint(
|
||||
string $file,
|
||||
string $password
|
||||
@@ -210,8 +213,6 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public creates a file :file inside folder :folder in the last shared public link space with password :password using wopi endpoint
|
||||
* @When the public tries to create a file :file inside folder :folder in the last shared public link space with password :password using wopi endpoint
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $folder
|
||||
@@ -220,6 +221,8 @@ class CollaborationContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('the public creates a file :file inside folder :folder in the last shared public link space with password :password using wopi endpoint')]
|
||||
#[When('the public tries to create a file :file inside folder :folder in the last shared public link space with password :password using wopi endpoint')]
|
||||
public function thePublicCreatesAFileInsideFolderInTheLastSharedPublicLinkSpaceWithPasswordUsingWopiEndpoint(
|
||||
string $file,
|
||||
string $folder,
|
||||
@@ -229,7 +232,6 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to check the information of file :file of space :space using office :app with invalid file-id
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -241,6 +243,7 @@ class CollaborationContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('user :user tries to check the information of file :file of space :space using office :app with invalid file-id')]
|
||||
public function userTriesToCheckTheInformationOfFileOfSpaceUsingOfficeWithInvalidFileId(
|
||||
string $user,
|
||||
string $file,
|
||||
@@ -276,7 +279,6 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to create a file :file inside deleted folder using wopi endpoint
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -284,6 +286,7 @@ class CollaborationContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user tries to create a file :file inside deleted folder using wopi endpoint')]
|
||||
public function userTriesToCreateAFileInsideDeletedFolderUsingWopiEndpoint(string $user, string $file): void {
|
||||
$parentContainerId = $this->featureContext->getStoredFileID();
|
||||
$this->featureContext->setResponse(
|
||||
@@ -299,7 +302,6 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has sent the following app-open request:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $properties
|
||||
@@ -307,6 +309,7 @@ class CollaborationContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has sent the following app-open request:')]
|
||||
public function userHasSentTheFollowingAppOpenRequest(string $user, TableNode $properties): void {
|
||||
$rows = $properties->getRowsHash();
|
||||
$appResponse = CollaborationHelper::sendPOSTRequestToAppOpen(
|
||||
@@ -322,14 +325,14 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to get the information of the last opened file using wopi endpoint
|
||||
* @When user :user gets the information of the last opened file using wopi endpoint
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user tries to get the information of the last opened file using wopi endpoint')]
|
||||
#[When('user :user gets the information of the last opened file using wopi endpoint')]
|
||||
public function userGetsTheInformationOfTheLastOpenedFileUsingWopiEndpoint(string $user): void {
|
||||
$response = json_decode($this->getLastAppOpenData());
|
||||
$accessToken = $response->form_parameters->access_token;
|
||||
@@ -348,7 +351,6 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the response (should|should not) contain the following MIME types:$/
|
||||
*
|
||||
* @param string $shouldOrNot
|
||||
* @param TableNode $table
|
||||
@@ -356,6 +358,7 @@ class CollaborationContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the response (should|should not) contain the following MIME types:$/')]
|
||||
public function theFollowingMimeTypesShouldExistForUser(string $shouldOrNot, TableNode $table): void {
|
||||
$rows = $table->getRows();
|
||||
$responseArray = $this->featureContext->getJsonDecodedResponse(
|
||||
@@ -380,13 +383,13 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the app list response should contain the following template information for office :app:
|
||||
*
|
||||
* @param string $app
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the app list response should contain the following template information for office :app:')]
|
||||
public function theAppListResponseShouldContainTheFollowingTemplateInformationForOffice(
|
||||
string $app,
|
||||
TableNode $table
|
||||
@@ -442,7 +445,6 @@ class CollaborationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user has created a file :file using wopi endpoint
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -450,6 +452,7 @@ class CollaborationContext implements Context {
|
||||
* @return string
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user has created a file :file using wopi endpoint')]
|
||||
public function userHasCreatedAFileInSpaceUsingWopiEndpoint(string $user, string $file): string {
|
||||
$parentContainerId = $this->featureContext->getFileIdForPath($user, "/");
|
||||
$response = CollaborationHelper::createFile(
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
use Behat\Behat\Context\Context;
|
||||
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Then;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -31,7 +32,6 @@ class FavoritesContext implements Context {
|
||||
private WebDavPropertiesContext $webDavPropertiesContext;
|
||||
|
||||
/**
|
||||
* @Then /^as user "([^"]*)" (?:file|folder|entry) "([^"]*)" should be favorited$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -40,6 +40,7 @@ class FavoritesContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('/^as user "([^"]*)" (?:file|folder|entry) "([^"]*)" should be favorited$/')]
|
||||
public function asUserFileOrFolderShouldBeFavorited(
|
||||
string $user,
|
||||
string $path,
|
||||
@@ -58,13 +59,13 @@ class FavoritesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as user "([^"]*)" (?:file|folder|entry) "([^"]*)" should not be favorited$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('/^as user "([^"]*)" (?:file|folder|entry) "([^"]*)" should not be favorited$/')]
|
||||
public function asUserFileShouldNotBeFavorited(string $user, string $path): void {
|
||||
$this->asUserFileOrFolderShouldBeFavorited($user, $path, 0);
|
||||
}
|
||||
|
||||
@@ -54,6 +54,9 @@ use Swaggest\JsonSchema\Exception\NumericException;
|
||||
use Swaggest\JsonSchema\Exception\ObjectException;
|
||||
use Swaggest\JsonSchema\Exception\StringException;
|
||||
use Swaggest\JsonSchema\Exception\TypeException;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -949,21 +952,21 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given using SharingNG
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('using SharingNG')]
|
||||
public function usingSharingNG(): void {
|
||||
$this->useSharingNG = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^using OCS API version "([^"]*)"$/
|
||||
*
|
||||
* @param string $version
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('using OCS API version :version')]
|
||||
public function usingOcsApiVersion(string $version): void {
|
||||
$this->ocsApiVersion = (int)$version;
|
||||
}
|
||||
@@ -1019,12 +1022,12 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^using server "(LOCAL|REMOTE)"$/
|
||||
*
|
||||
* @param string|null $server
|
||||
*
|
||||
* @return string Previous used server
|
||||
*/
|
||||
#[Given('/^using server "(LOCAL|REMOTE)"$/')]
|
||||
public function usingServer(?string $server): string {
|
||||
$previousServer = $this->currentServer;
|
||||
if ($server === 'LOCAL') {
|
||||
@@ -1323,8 +1326,6 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sends HTTP method "([^"]*)" to URL "([^"]*)"$/
|
||||
* @When /^user "([^"]*)" tries to send HTTP method "([^"]*)" to URL "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $verb
|
||||
@@ -1332,6 +1333,8 @@ class FeatureContext extends BehatVariablesContext {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user sends HTTP method :verb to URL :url')]
|
||||
#[When('user :user tries to send HTTP method :verb to URL :url')]
|
||||
public function userSendsHTTPMethodToUrl(string $user, string $verb, string $url): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
$endpoint = $this->substituteInLineCodes($url, $user);
|
||||
@@ -1339,7 +1342,6 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public sends HTTP method :method to URL :url with password :password
|
||||
*
|
||||
* @param string $method
|
||||
* @param string $url
|
||||
@@ -1347,6 +1349,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public sends HTTP method :method to URL :url with password :password')]
|
||||
public function thePublicSendsHttpMethodToUrlWithPassword(string $method, string $url, string $password): void {
|
||||
$password = $this->getActualPassword($password);
|
||||
$token = $this->shareNgGetLastCreatedLinkShareToken();
|
||||
@@ -1367,7 +1370,6 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sends HTTP method "([^"]*)" to URL "([^"]*)" with headers$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $verb
|
||||
@@ -1378,6 +1380,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('user :user sends HTTP method :verb to URL :url with headers')]
|
||||
public function userSendsHTTPMethodToUrlWithHeaders(
|
||||
string $user,
|
||||
string $verb,
|
||||
@@ -1419,7 +1422,6 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user sends HTTP method :method to URL :davPath with content :content
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $method
|
||||
@@ -1428,6 +1430,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user sends HTTP method :method to URL :davPath with content :content')]
|
||||
public function userSendsHttpMethodToUrlWithContent(
|
||||
string $user,
|
||||
string $method,
|
||||
@@ -1437,25 +1440,6 @@ class FeatureContext extends BehatVariablesContext {
|
||||
$this->setResponse($this->sendingToWithDirectUrl($user, $method, $davPath, $content));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sends HTTP method "([^"]*)" to URL "([^"]*)" with password "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $verb
|
||||
* @param string $url
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function userSendsHTTPMethodToUrlWithPassword(
|
||||
string $user,
|
||||
string $verb,
|
||||
string $url,
|
||||
string $password
|
||||
): void {
|
||||
$this->setResponse($this->sendingToWithDirectUrl($user, $verb, $url, null, $password));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
* @param string $verb
|
||||
@@ -1618,7 +1602,6 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the ocs JSON data of the response should match
|
||||
*
|
||||
* @param PyStringNode $schemaString
|
||||
*
|
||||
@@ -1626,6 +1609,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the ocs JSON data of the response should match')]
|
||||
public function theOcsDataOfTheResponseShouldMatch(
|
||||
PyStringNode $schemaString
|
||||
): void {
|
||||
@@ -1637,13 +1621,13 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the JSON data of the response should match
|
||||
*
|
||||
* @param PyStringNode $schemaString
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the JSON data of the response should match')]
|
||||
public function theJsonDataOfTheResponseShouldMatch(PyStringNode $schemaString): void {
|
||||
$responseBody = $this->getJsonDecodedResponseBodyContent();
|
||||
$this->assertJsonDocumentMatchesSchema(
|
||||
@@ -1653,24 +1637,24 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the HTTP status code should be "([^"]*)"$/
|
||||
*
|
||||
* @param int|string $statusCode
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the HTTP status code should be :statusCode')]
|
||||
public function thenTheHTTPStatusCodeShouldBe($statusCode): void {
|
||||
$this->theHTTPStatusCodeShouldBe($statusCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the HTTP status code should be "([^"]*)" or "([^"]*)"$/
|
||||
*
|
||||
* @param int|string $statusCode1
|
||||
* @param int|string $statusCode2
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the HTTP status code should be :statusCode1 or :statusCode2')]
|
||||
public function theHTTPStatusCodeShouldBeOr($statusCode1, $statusCode2): void {
|
||||
$this->theHTTPStatusCodeShouldBe(
|
||||
[$statusCode1, $statusCode2]
|
||||
@@ -1678,7 +1662,6 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the HTTP status code should be between "(\d+)" and "(\d+)"$/
|
||||
*
|
||||
* @param int|string $minStatusCode
|
||||
* @param int|string $maxStatusCode
|
||||
@@ -1686,6 +1669,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the HTTP status code should be between :minStatusCode and :maxStatusCode')]
|
||||
public function theHTTPStatusCodeShouldBeBetween(
|
||||
$minStatusCode,
|
||||
$maxStatusCode,
|
||||
@@ -2016,10 +2000,10 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator requests status.php
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator requests status.php')]
|
||||
public function theAdministratorRequestsStatusPhp(): void {
|
||||
$this->response = $this->getStatusPhp();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@ use Psr\Http\Message\ResponseInterface;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -55,7 +58,6 @@ class FilesVersionsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to get versions of file :file from :fileOwner
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -64,12 +66,12 @@ class FilesVersionsContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user tries to get versions of file :file from :fileOwner')]
|
||||
public function userTriesToGetFileVersions(string $user, string $file, string $fileOwner): void {
|
||||
$this->featureContext->setResponse($this->getFileVersions($user, $file, $fileOwner));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user gets the number of versions of file :file
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -77,12 +79,12 @@ class FilesVersionsContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user gets the number of versions of file :file')]
|
||||
public function userGetsFileVersions(string $user, string $file): void {
|
||||
$this->featureContext->setResponse($this->getFileVersions($user, $file));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public tries to get the number of versions of file :file with password :password using file-id :endpoint
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $password
|
||||
@@ -90,6 +92,7 @@ class FilesVersionsContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public tries to get the number of versions of file :file with password :password using file-id :endpoint')]
|
||||
public function thePublicTriesToGetTheNumberOfVersionsOfFileWithPasswordUsingFileId(
|
||||
string $file,
|
||||
string $password,
|
||||
@@ -148,14 +151,14 @@ class FilesVersionsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user gets the number of versions of file :resource using file-id :fileId
|
||||
* @When user :user tries to get the number of versions of file :resource using file-id :fileId
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileId
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user gets the number of versions of file :resource using file-id :fileId')]
|
||||
#[When('user :user tries to get the number of versions of file :resource using file-id :fileId')]
|
||||
public function userGetsTheNumberOfVersionsOfFileOfTheSpace(string $user, string $fileId): void {
|
||||
$this->featureContext->setResponse(
|
||||
$this->featureContext->makeDavRequest(
|
||||
@@ -240,7 +243,6 @@ class FilesVersionsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has restored version index :versionIndex of file :path
|
||||
*
|
||||
* @param string $user
|
||||
* @param int $versionIndex
|
||||
@@ -249,13 +251,13 @@ class FilesVersionsContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has restored version index :versionIndex of file :path')]
|
||||
public function userHasRestoredVersionIndexOfFile(string $user, int $versionIndex, string $path): void {
|
||||
$response = $this->restoreVersionIndexOfFile($user, $versionIndex, $path);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(204, "", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user restores version index :versionIndex of file :path using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param int $versionIndex
|
||||
@@ -264,6 +266,7 @@ class FilesVersionsContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user restores version index :versionIndex of file :path using the WebDAV API')]
|
||||
public function userRestoresVersionIndexOfFile(string $user, int $versionIndex, string $path): void {
|
||||
$response = $this->restoreVersionIndexOfFile($user, $versionIndex, $path);
|
||||
$this->featureContext->setResponse($response, $user);
|
||||
@@ -297,7 +300,6 @@ class FilesVersionsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the version folder of file :path for user :user should contain :count element(s)
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $user
|
||||
@@ -306,6 +308,7 @@ class FilesVersionsContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the version folder of file :path for user :user should contain :count element(s)')]
|
||||
public function theVersionFolderOfFileShouldContainElements(
|
||||
string $path,
|
||||
string $user,
|
||||
@@ -322,7 +325,6 @@ class FilesVersionsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the content length of file :path with version index :index for user :user in versions folder should be :length
|
||||
*
|
||||
* @param string $path
|
||||
* @param int $index
|
||||
@@ -332,6 +334,7 @@ class FilesVersionsContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the content length of file :path with version index :index for user :user in versions folder should be :length')]
|
||||
public function theContentLengthOfFileForUserInVersionsFolderIs(
|
||||
string $path,
|
||||
int $index,
|
||||
@@ -406,7 +409,6 @@ class FilesVersionsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user downloads the version of file :path with the index :index
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -415,12 +417,12 @@ class FilesVersionsContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user downloads the version of file :path with the index :index')]
|
||||
public function userDownloadsVersion(string $user, string $path, string $index): void {
|
||||
$this->featureContext->setResponse($this->downloadVersion($user, $path, $index), $user);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the content of version index "([^"]*)" of file "([^"]*)" for user "([^"]*)" should be "([^"]*)"$/
|
||||
*
|
||||
* @param string $index
|
||||
* @param string $path
|
||||
@@ -430,6 +432,7 @@ class FilesVersionsContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the content of version index :index of file :path for user :user should be :content')]
|
||||
public function theContentOfVersionIndexOfFileForUserShouldBe(
|
||||
string $index,
|
||||
string $path,
|
||||
@@ -442,7 +445,6 @@ class FilesVersionsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" retrieves the meta information of (file|fileId) "([^"]*)" using the meta API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileOrFileId
|
||||
@@ -450,6 +452,7 @@ class FilesVersionsContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^user "([^"]*)" retrieves the meta information of (file|fileId) "([^"]*)" using the meta API$/')]
|
||||
public function userGetMetaInfo(string $user, string $fileOrFileId, string $path): void {
|
||||
$user = $this->featureContext->getActualUsername($user);
|
||||
$baseUrl = $this->featureContext->getBaseUrl();
|
||||
@@ -525,8 +528,6 @@ class FilesVersionsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user gets the number of versions of file :file from space :space
|
||||
* @When user :user tries to get the number of versions of file :file from space :space
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -534,6 +535,7 @@ class FilesVersionsContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user tries to get the number of versions of file :file from space :space')]
|
||||
public function userGetsTheNumberOfVersionsOfFileFromSpace(string $user, string $file, string $space): void {
|
||||
$fileId = $this->spacesContext->getFileId($user, $space, $file);
|
||||
$this->featureContext->setResponse(
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -16,6 +16,9 @@ use TestHelpers\OcsApiHelper;
|
||||
use TestHelpers\GraphHelper;
|
||||
use TestHelpers\SettingsHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -128,12 +131,12 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" lists all notifications$/
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user lists all notifications')]
|
||||
public function userListAllNotifications(string $user): void {
|
||||
$response = $this->listAllNotifications($user);
|
||||
$this->featureContext->setResponse($response);
|
||||
@@ -160,7 +163,6 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user deletes all notifications
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
@@ -168,13 +170,13 @@ class NotificationContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('user :user deletes all notifications')]
|
||||
public function userDeletesAllNotifications(string $user): void {
|
||||
$response = $this->deleteAllNotifications($user);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has deleted all notifications
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
@@ -182,13 +184,13 @@ class NotificationContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[Given('user :user has deleted all notifications')]
|
||||
public function userHasDeletedAllNotifications(string $user): void {
|
||||
$response = $this->deleteAllNotifications($user);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, "", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user deletes a notification related to resource :resource with subject :subject
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
@@ -198,6 +200,7 @@ class NotificationContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('user :user deletes a notification related to resource :resource with subject :subject')]
|
||||
public function userDeletesNotificationOfResourceAndSubject(string $user, string $resource, string $subject): void {
|
||||
$response = $this->listAllNotifications($user);
|
||||
$this->filterNotificationsBySubjectAndResource($subject, $resource, $response);
|
||||
@@ -229,11 +232,11 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the notifications should be empty
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the notifications should be empty')]
|
||||
public function theNotificationsShouldBeEmpty(): void {
|
||||
$statusCode = $this->featureContext->getResponse()->getStatusCode();
|
||||
if ($statusCode !== 200) {
|
||||
@@ -248,13 +251,13 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should not have any notification
|
||||
*
|
||||
* @param $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('user :user should not have any notification')]
|
||||
public function userShouldNotHaveAnyNotification($user): void {
|
||||
$response = $this->listAllNotifications($user);
|
||||
$notifications = $this->featureContext->getJsonDecodedResponseBodyContent($response)->ocs->data;
|
||||
@@ -262,13 +265,13 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^there should be "([^"]*)" notifications$/
|
||||
*
|
||||
* @param int $numberOfNotification
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('there should be :numberOfNotification notifications')]
|
||||
public function userShouldHaveNotifications(int $numberOfNotification): void {
|
||||
if (!isset($this->featureContext->getJsonDecodedResponseBodyContent()->ocs->data)) {
|
||||
throw new Exception("Notification is empty");
|
||||
@@ -283,7 +286,6 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the JSON response should contain a notification message with the subject "([^"]*)" and the message-details should match$/
|
||||
*
|
||||
* @param string $subject
|
||||
* @param PyStringNode $schemaString
|
||||
@@ -291,6 +293,7 @@ class NotificationContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the JSON response should contain a notification message with the subject :subject and the message-details should match')]
|
||||
public function theJsonDataFromLastResponseShouldMatch(
|
||||
string $subject,
|
||||
PyStringNode $schemaString
|
||||
@@ -377,7 +380,6 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should get a notification with subject "([^"]*)" and message:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $subject
|
||||
@@ -386,6 +388,7 @@ class NotificationContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('user :user should get a notification with subject :subject and message:')]
|
||||
public function userShouldGetANotificationWithMessage(string $user, string $subject, TableNode $table): void {
|
||||
$count = 0;
|
||||
// Sometimes the test might try to get the notifications before the server has created the notification.
|
||||
@@ -419,7 +422,6 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should get a notification for resource :resource with subject :subject and message:
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
@@ -429,6 +431,7 @@ class NotificationContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('user :user should get a notification for resource :resource with subject :subject and message:')]
|
||||
public function userShouldGetNotificationForResourceWithMessage(
|
||||
string $user,
|
||||
string $resource,
|
||||
@@ -462,7 +465,6 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should not get a notification related to resource :resource with subject :subject
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
@@ -470,6 +472,7 @@ class NotificationContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('user :user should not get a notification related to resource :resource with subject :subject')]
|
||||
public function userShouldNotHaveANotificationRelatedToResourceWithSubject(
|
||||
string $user,
|
||||
string $resource,
|
||||
@@ -486,7 +489,6 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should have received the following email from user :sender about the share of project space :spaceName
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $sender
|
||||
@@ -496,6 +498,7 @@ class NotificationContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('user :user should have received the following email from user :sender about the share of project space :spaceName')]
|
||||
public function userShouldHaveReceivedTheFollowingEmailFromUserAboutTheShareOfProjectSpace(
|
||||
string $user,
|
||||
string $sender,
|
||||
@@ -529,7 +532,6 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should have received the following email from user :sender
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $sender
|
||||
@@ -538,6 +540,7 @@ class NotificationContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('user :user should have received the following email from user :sender')]
|
||||
public function userShouldHaveReceivedTheFollowingEmailFromUser(
|
||||
string $user,
|
||||
string $sender,
|
||||
@@ -552,7 +555,6 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should have received the following email from user :sender ignoring whitespaces
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $sender
|
||||
@@ -561,6 +563,7 @@ class NotificationContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('user :user should have received the following email from user :sender ignoring whitespaces')]
|
||||
public function userShouldHaveReceivedTheFollowingEmailFromUserIgnoringWhitespaces(
|
||||
string $user,
|
||||
string $sender,
|
||||
@@ -692,8 +695,6 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator creates a deprovisioning notification
|
||||
* @When user :user tries to create a deprovisioning notification
|
||||
*
|
||||
* @param string|null $user
|
||||
*
|
||||
@@ -702,6 +703,8 @@ class NotificationContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('the administrator creates a deprovisioning notification')]
|
||||
#[When('user :user tries to create a deprovisioning notification')]
|
||||
public function theAdministratorCreatesADeprovisioningNotification(?string $user = null) {
|
||||
$response = $this->userCreatesDeprovisioningNotification($user);
|
||||
$this->featureContext->setResponse($response);
|
||||
@@ -709,7 +712,6 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator creates a deprovisioning notification for date :deprovision_date of format :deprovision_date_format
|
||||
*
|
||||
* @param $deprovision_date
|
||||
* @param $deprovision_date_format
|
||||
@@ -719,6 +721,7 @@ class NotificationContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('the administrator creates a deprovisioning notification for date :deprovision_date of format :deprovision_date_format')]
|
||||
public function theAdministratorCreatesADeprovisioningNotificationUsingDateFormat(
|
||||
$deprovision_date,
|
||||
$deprovision_date_format
|
||||
@@ -729,23 +732,23 @@ class NotificationContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the administrator has created a deprovisioning notification
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('the administrator has created a deprovisioning notification')]
|
||||
public function userHasCreatedDeprovisioningNotification(): void {
|
||||
$response = $this->userCreatesDeprovisioningNotification();
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, "", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator deletes the deprovisioning notification
|
||||
* @When user :user tries to delete the deprovisioning notification
|
||||
*
|
||||
* @param string|null $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the administrator deletes the deprovisioning notification')]
|
||||
#[When('user :user tries to delete the deprovisioning notification')]
|
||||
public function userDeletesDeprovisioningNotification(?string $user = null): void {
|
||||
$payload["ids"] = ["deprovision"];
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
use Behat\Behat\Context\Context;
|
||||
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
|
||||
use Behat\Gherkin\Node\PyStringNode;
|
||||
use Behat\Gherkin\Node\TableNode;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use PHPUnit\Framework\Assert;
|
||||
@@ -28,6 +27,8 @@ use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\OcsApiHelper;
|
||||
use TestHelpers\TranslationHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -38,21 +39,6 @@ class OCSContext implements Context {
|
||||
private FeatureContext $featureContext;
|
||||
|
||||
/**
|
||||
* @When /^the user sends HTTP method "([^"]*)" to OCS API endpoint "([^"]*)"$/
|
||||
*
|
||||
* @param string $verb
|
||||
* @param string $url
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function theUserSendsToOcsApiEndpoint(string $verb, string $url): void {
|
||||
$response = $this->theUserSendsToOcsApiEndpointWithBody($verb, $url);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sends HTTP method "([^"]*)" to OCS API endpoint "([^"]*)"$/
|
||||
* @When /^user "([^"]*)" sends HTTP method "([^"]*)" to OCS API endpoint "([^"]*)" using password "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $verb
|
||||
@@ -61,6 +47,7 @@ class OCSContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user sends HTTP method :verb to OCS API endpoint :url')]
|
||||
public function userSendsToOcsApiEndpoint(string $user, string $verb, string $url, ?string $password = null): void {
|
||||
$response = $this->sendRequestToOcsEndpoint(
|
||||
$user,
|
||||
@@ -143,27 +130,6 @@ class OCSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $verb
|
||||
* @param string $url
|
||||
* @param TableNode|null $body
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function theUserSendsToOcsApiEndpointWithBody(
|
||||
string $verb,
|
||||
string $url,
|
||||
?TableNode $body = null
|
||||
): ResponseInterface {
|
||||
return $this->sendRequestToOcsEndpoint(
|
||||
$this->featureContext->getCurrentUser(),
|
||||
$verb,
|
||||
$url,
|
||||
$body
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sends HTTP method "([^"]*)" to OCS API endpoint "([^"]*)" with headers$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $verb
|
||||
@@ -173,6 +139,7 @@ class OCSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user sends HTTP method :verb to OCS API endpoint :url with headers')]
|
||||
public function userSendsToOcsApiEndpointWithHeaders(
|
||||
string $user,
|
||||
string $verb,
|
||||
@@ -194,7 +161,6 @@ class OCSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the OCS status code should be "([^"]*)"$/
|
||||
*
|
||||
* @param string $statusCode
|
||||
* @param string $message
|
||||
@@ -203,6 +169,7 @@ class OCSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the OCS status code should be :statusCode')]
|
||||
public function theOCSStatusCodeShouldBe(
|
||||
string $statusCode,
|
||||
string $message = "",
|
||||
@@ -237,41 +204,15 @@ class OCSContext implements Context {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the OCS status code should be "([^"]*)" or "([^"]*)"$/
|
||||
*
|
||||
* @param string $statusCode1
|
||||
* @param string $statusCode2
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theOcsStatusCodeShouldBeOr(string $statusCode1, string $statusCode2): void {
|
||||
$statusCodes = [$statusCode1,$statusCode1];
|
||||
$response = $this->featureContext->getResponse();
|
||||
$responseStatusCode = $this->getOCSResponseStatusCode(
|
||||
$response
|
||||
);
|
||||
Assert::assertContainsEquals(
|
||||
$responseStatusCode,
|
||||
$statusCodes,
|
||||
"OCS status code is not any of the expected values "
|
||||
. \implode(",", $statusCodes) . " got " . $responseStatusCode
|
||||
);
|
||||
$this->featureContext->emptyLastOCSStatusCodesArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the text in an OCS status message
|
||||
*
|
||||
* @Then /^the OCS status message should be "([^"]*)"$/
|
||||
* @Then /^the OCS status message should be "([^"]*)" in language "([^"]*)"$/
|
||||
*
|
||||
* @param string $statusMessage
|
||||
* @param string|null $language
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the OCS status message should be :statusMessage')]
|
||||
public function theOCSStatusMessageShouldBe(string $statusMessage, ?string $language = null): void {
|
||||
$language = TranslationHelper::getLanguage($language);
|
||||
$statusMessage = $this->getActualStatusMessage($statusMessage, $language);
|
||||
@@ -287,38 +228,6 @@ class OCSContext implements Context {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the text in an OCS status message.
|
||||
* Use this step form if the expected text contains double quotes,
|
||||
* single quotes and other content that theOCSStatusMessageShouldBe()
|
||||
* cannot handle.
|
||||
*
|
||||
* After the step, write the expected text in PyString form like:
|
||||
*
|
||||
* """
|
||||
* File "abc.txt" can't be shared due to reason "xyz"
|
||||
* """
|
||||
*
|
||||
* @Then /^the OCS status message should be:$/
|
||||
*
|
||||
* @param PyStringNode $statusMessage
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function theOCSStatusMessageShouldBePyString(
|
||||
PyStringNode $statusMessage
|
||||
): void {
|
||||
Assert::assertEquals(
|
||||
$statusMessage->getRaw(),
|
||||
$this->getOCSResponseStatusMessage(
|
||||
$this->featureContext->getResponse()
|
||||
),
|
||||
'Unexpected OCS status message: "' . $this->getOCSResponseStatusMessage(
|
||||
$this->featureContext->getResponse()
|
||||
) . '" in response'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the xml answer to get ocs response which doesn't match with
|
||||
* http one in v1 of the api.
|
||||
|
||||
@@ -24,6 +24,7 @@ use GuzzleHttp\Exception\GuzzleException;
|
||||
use TestHelpers\OcConfigHelper;
|
||||
use TestHelpers\GraphHelper;
|
||||
use PHPUnit\Framework\Assert;
|
||||
use Behat\Step\Given;
|
||||
|
||||
/**
|
||||
* steps needed to re-configure OpenCloud server
|
||||
@@ -48,13 +49,13 @@ class OcConfigContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given async upload has been enabled with post-processing delayed to :delayTime seconds
|
||||
*
|
||||
* @param string $delayTime
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('async upload has been enabled with post-processing delayed to :delayTime seconds')]
|
||||
public function asyncUploadHasBeenEnabledWithDelayedPostProcessing(string $delayTime): void {
|
||||
$envs = [
|
||||
"OC_ASYNC_UPLOADS" => true,
|
||||
@@ -72,7 +73,6 @@ class OcConfigContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the config :configVariable has been set to :configValue
|
||||
*
|
||||
* @param string $configVariable
|
||||
* @param string $configValue
|
||||
@@ -80,6 +80,7 @@ class OcConfigContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('the config :configVariable has been set to :configValue')]
|
||||
public function theConfigHasBeenSetTo(string $configVariable, string $configValue): void {
|
||||
$envs = [
|
||||
$configVariable => $configValue,
|
||||
@@ -97,12 +98,12 @@ class OcConfigContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the administrator has enabled the permissions role :role
|
||||
*
|
||||
* @param string $role
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('the administrator has enabled the permissions role :role')]
|
||||
public function theAdministratorHasEnabledTheRole(string $role): void {
|
||||
$roleId = GraphHelper::getPermissionsRoleIdByName($role);
|
||||
$defaultRoles = array_values(GraphHelper::DEFAULT_PERMISSIONS_ROLES);
|
||||
@@ -123,12 +124,12 @@ class OcConfigContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the administrator has disabled the permissions role :role
|
||||
*
|
||||
* @param string $role
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('the administrator has disabled the permissions role :role')]
|
||||
public function theAdministratorHasDisabledThePermissionsRole(string $role): void {
|
||||
$roleId = GraphHelper::getPermissionsRoleIdByName($role);
|
||||
$availableRoles = $this->getEnabledPermissionsRoles();
|
||||
@@ -149,7 +150,6 @@ class OcConfigContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the config :configVariable has been set to path :path
|
||||
*
|
||||
* @param string $configVariable
|
||||
* @param string $path
|
||||
@@ -157,6 +157,7 @@ class OcConfigContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('the config :configVariable has been set to path :path')]
|
||||
public function theConfigHasBeenSetPathTo(string $configVariable, string $path): void {
|
||||
if (\getenv('TEST_ROOT_PATH')) {
|
||||
$path = \getenv('TEST_ROOT_PATH') . "/" . $path;
|
||||
@@ -177,13 +178,13 @@ class OcConfigContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the following configs have been set:
|
||||
*
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('the following configs have been set:')]
|
||||
public function theConfigHasBeenSetToValue(TableNode $table): void {
|
||||
$envs = [];
|
||||
foreach ($table->getHash() as $row) {
|
||||
|
||||
@@ -27,6 +27,8 @@ use TestHelpers\OcHelper;
|
||||
use TestHelpers\OcmHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\When;
|
||||
|
||||
/**
|
||||
* Acceptance test steps related to testing federation share(ocm) features
|
||||
@@ -88,8 +90,6 @@ class OcmContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When :user creates the federation share invitation
|
||||
* @When :user creates the federation share invitation with email :email and description :description
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $email
|
||||
@@ -98,13 +98,13 @@ class OcmContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When(':user creates the federation share invitation')]
|
||||
#[When(':user creates the federation share invitation with email :email and description :description')]
|
||||
public function userCreatesTheFederationShareInvitation(string $user, $email = null, $description = null): void {
|
||||
$this->featureContext->setResponse($this->createInvitation($user, $email, $description));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given :user has created the federation share invitation
|
||||
* @Given :user has created the federation share invitation with email :email and description :description
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $email
|
||||
@@ -113,6 +113,8 @@ class OcmContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given(':user has created the federation share invitation')]
|
||||
#[Given(':user has created the federation share invitation with email :email and description :description')]
|
||||
public function userHasCreatedTheFederationShareInvitation(string $user, $email = null, $description = null): void {
|
||||
$response = $this->createInvitation($user, $email, $description);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
|
||||
@@ -141,38 +143,38 @@ class OcmContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When :user accepts the last federation share invitation
|
||||
* @When :user tries to accept the last federation share invitation
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When(':user accepts the last federation share invitation')]
|
||||
#[When(':user tries to accept the last federation share invitation')]
|
||||
public function userAcceptsTheLastFederationShareInvitation(string $user): void {
|
||||
$this->featureContext->setResponse($this->acceptInvitation($user));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When :user tries to accept the invitation with invalid token
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When(':user tries to accept the invitation with invalid token')]
|
||||
public function userTriesToAcceptInvitationWithInvalidToken(string $user): void {
|
||||
$this->featureContext->setResponse($this->acceptInvitation($user, WebDavHelper::generateUUIDv4()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given :user has accepted invitation
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given(':user has accepted invitation')]
|
||||
public function userHasAcceptedTheLastFederationShareInvitation(string $user): void {
|
||||
$response = $this->acceptInvitation($user);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
|
||||
@@ -194,13 +196,13 @@ class OcmContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When :user searches for accepted users
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When(':user searches for accepted users')]
|
||||
public function userFindsAcceptedUsers(string $user): void {
|
||||
$this->featureContext->setResponse($this->findAcceptedUsers($user));
|
||||
}
|
||||
@@ -239,31 +241,30 @@ class OcmContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When :user lists the created invitations
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When(':user lists the created invitations')]
|
||||
public function userListsCreatedInvitations(string $user): void {
|
||||
$this->featureContext->setResponse($this->listInvitations($user));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the user waits :number seconds for the invitation token to expire
|
||||
*
|
||||
* @param int $number
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('the user waits :number seconds for the invitation token to expire')]
|
||||
public function theUserWaitsForTokenToExpire(int $number): void {
|
||||
\sleep($number);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user deletes federated connection with user :ocmUser using the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $ocmUser
|
||||
@@ -271,12 +272,12 @@ class OcmContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user deletes federated connection with user :ocmUser using the Graph API')]
|
||||
public function userDeletesFederatedConnectionWithUserUsingTheGraphApi(string $user, string $ocmUser): void {
|
||||
$this->featureContext->setResponse($this->deleteConnection($user, $ocmUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user has deleted federated connection with user :ocmUser
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $ocmUser
|
||||
@@ -284,6 +285,7 @@ class OcmContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user has deleted federated connection with user :ocmUser')]
|
||||
public function userHasDeletedFederatedConnectionWithUser(string $user, string $ocmUser): void {
|
||||
$response = $this->deleteConnection($user, $ocmUser);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
use Behat\Gherkin\Node\TableNode;
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use PHPUnit\Framework\Assert;
|
||||
@@ -32,6 +31,9 @@ use TestHelpers\GraphHelper;
|
||||
use Laminas\Ldap\Exception\LdapException;
|
||||
use Laminas\Ldap\Ldap;
|
||||
use TestHelpers\TokenHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
/**
|
||||
* Functions for provisioning of users and groups
|
||||
@@ -188,13 +190,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has been created with default attributes
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[Given('user :user has been created with default attributes')]
|
||||
public function userHasBeenCreatedWithDefaultAttributes(
|
||||
string $user
|
||||
): void {
|
||||
@@ -202,13 +204,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given these users have been created without being initialized:
|
||||
*
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[Given('these users have been created without being initialized:')]
|
||||
public function userHasBeenCreatedWithDefaultAttributesAndNotInitialized(
|
||||
TableNode $table
|
||||
): void {
|
||||
@@ -216,7 +218,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given these users have been created with default attributes:
|
||||
* expects a table of users with the heading
|
||||
* "|username|"
|
||||
*
|
||||
@@ -225,12 +226,12 @@ trait Provisioning {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[Given('these users have been created with default attributes:')]
|
||||
public function theseUsersHaveBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles(TableNode $table): void {
|
||||
$this->usersHaveBeenCreated($table);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the user :byUser has created a new user with the following attributes:
|
||||
*
|
||||
* @param string $byUser
|
||||
* @param TableNode $table
|
||||
@@ -238,6 +239,7 @@ trait Provisioning {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[Given('the user :byUser has created a new user with the following attributes:')]
|
||||
public function theAdministratorHasCreatedANewUserWithFollowingSettings(string $byUser, TableNode $table): void {
|
||||
$rows = $table->getRowsHash();
|
||||
$this->userHasBeenCreated(
|
||||
@@ -725,13 +727,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the administrator deletes user "([^"]*)" using the provisioning API$/
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('the administrator deletes user :user using the provisioning API')]
|
||||
public function theAdminDeletesUserUsingTheProvisioningApi(string $user): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
$this->setResponse($this->deleteUser($user));
|
||||
@@ -739,13 +741,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should exist$/
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[Then('user :user should exist')]
|
||||
public function userShouldExist(string $user): void {
|
||||
Assert::assertTrue(
|
||||
$this->userExists($user),
|
||||
@@ -754,13 +756,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should not exist$/
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[Then('user :user should not exist')]
|
||||
public function userShouldNotExist(string $user): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
Assert::assertFalse(
|
||||
@@ -771,7 +773,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^group "([^"]*)" should exist$/
|
||||
*
|
||||
* @param string $group
|
||||
*
|
||||
@@ -779,6 +780,7 @@ trait Provisioning {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Then('group :group should exist')]
|
||||
public function groupShouldExist(string $group): void {
|
||||
Assert::assertTrue(
|
||||
$this->groupExists($group),
|
||||
@@ -787,7 +789,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^group "([^"]*)" should not exist$/
|
||||
*
|
||||
* @param string $group
|
||||
*
|
||||
@@ -795,6 +796,7 @@ trait Provisioning {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Then('group :group should not exist')]
|
||||
public function groupShouldNotExist(string $group): void {
|
||||
Assert::assertFalse(
|
||||
$this->groupExists($group),
|
||||
@@ -803,7 +805,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^these groups should (not|)\s?exist:$/
|
||||
* expects a table of groups with the heading "groupname"
|
||||
*
|
||||
* @param string $shouldOrNot (not|)
|
||||
@@ -812,6 +813,7 @@ trait Provisioning {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^these groups should (not|)\\s?exist:$/')]
|
||||
public function theseGroupsShouldNotExist(string $shouldOrNot, TableNode $table): void {
|
||||
$should = ($shouldOrNot !== "not");
|
||||
$this->verifyTableNodeColumns($table, ['groupname']);
|
||||
@@ -832,13 +834,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has been deleted$/
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has been deleted')]
|
||||
public function userHasBeenDeleted(string $user): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
if ($this->isTestingWithLdap() && \in_array($user, $this->ldapCreatedUsers)) {
|
||||
@@ -885,20 +887,6 @@ trait Provisioning {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user gets the list of all users using the provisioning API
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function userGetsTheListOfAllUsersUsingTheProvisioningApi(string $user): void {
|
||||
$this->featureContext->setResponse(
|
||||
$this->userGetsTheListOfAllUsers($user)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
*
|
||||
@@ -1121,7 +1109,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator removes user :user from group :group using the provisioning API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $group
|
||||
@@ -1129,6 +1116,7 @@ trait Provisioning {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('the administrator removes user :user from group :group using the provisioning API')]
|
||||
public function adminRemovesUserFromGroupUsingTheProvisioningApi(string $user, string $group): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
if (OcHelper::isTestingOnReva()) {
|
||||
@@ -1154,13 +1142,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the extra groups returned by the API should be$/
|
||||
*
|
||||
* @param TableNode $groupsList
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the extra groups returned by the API should be')]
|
||||
public function theExtraGroupsShouldBe(TableNode $groupsList): void {
|
||||
$this->verifyTableNodeColumnsCount($groupsList, 1);
|
||||
$groups = $groupsList->getRows();
|
||||
@@ -1248,7 +1236,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should belong to group "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $group
|
||||
@@ -1256,6 +1243,7 @@ trait Provisioning {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('user :user should belong to group :group')]
|
||||
public function userShouldBelongToGroup(string $user, string $group): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
if (OcHelper::isTestingOnReva()) {
|
||||
@@ -1286,13 +1274,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the following users should not belong to the following groups
|
||||
*
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the following users should not belong to the following groups')]
|
||||
public function theTheFollowingUserShouldNotBelongToTheFollowingGroup(TableNode $table): void {
|
||||
$this->verifyTableNodeColumns($table, ["username", "groupname"]);
|
||||
$rows = $table->getHash();
|
||||
@@ -1321,27 +1309,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then group :group should not contain user :username
|
||||
*
|
||||
* @param string $group
|
||||
* @param string $username
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function groupShouldNotContainUser(string $group, string $username): void {
|
||||
$username = $this->getActualUsername($username);
|
||||
$fullUrl = $this->getBaseUrl() . "/ocs/v2.php/cloud/groups/$group";
|
||||
$response = HttpRequestHelper::get(
|
||||
$fullUrl,
|
||||
$this->getStepLineRef(),
|
||||
$this->getAdminUsername(),
|
||||
$this->getAdminPassword()
|
||||
);
|
||||
Assert::assertNotContains($username, $this->getArrayOfUsersResponded($response));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the administrator adds user "([^"]*)" to group "([^"]*)" using the provisioning API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $group
|
||||
@@ -1349,13 +1316,13 @@ trait Provisioning {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('the administrator adds user :user to group :group using the provisioning API')]
|
||||
public function adminAddsUserToGroupUsingTheProvisioningApi(string $user, string $group): void {
|
||||
$response = $this->graphContext->addUserToGroup($group, $user);
|
||||
$this->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has been added to group "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $group
|
||||
@@ -1363,6 +1330,7 @@ trait Provisioning {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has been added to group :group')]
|
||||
public function userHasBeenAddedToGroup(string $user, string $group): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
if ($this->isTestingWithLdap()) {
|
||||
@@ -1383,13 +1351,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the following users have been added to the following groups
|
||||
*
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('the following users have been added to the following groups')]
|
||||
public function theFollowingUserHaveBeenAddedToTheFollowingGroup(TableNode $table): void {
|
||||
$this->verifyTableNodeColumns($table, ['username', 'groupname']);
|
||||
foreach ($table as $row) {
|
||||
@@ -1461,7 +1429,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^group "([^"]*)" has been created$/
|
||||
*
|
||||
* @param string $group
|
||||
*
|
||||
@@ -1469,6 +1436,7 @@ trait Provisioning {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('group :group has been created')]
|
||||
public function groupHasBeenCreated(string $group): void {
|
||||
$this->createTheGroup($group);
|
||||
Assert::assertTrue(
|
||||
@@ -1478,7 +1446,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given these groups have been created:
|
||||
* expects a table of groups with the heading "groupname"
|
||||
*
|
||||
* @param TableNode $table
|
||||
@@ -1486,6 +1453,7 @@ trait Provisioning {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('these groups have been created:')]
|
||||
public function theseGroupsHaveBeenCreated(TableNode $table): void {
|
||||
$this->verifyTableNodeColumns($table, ['groupname'], ['comment']);
|
||||
foreach ($table as $row) {
|
||||
@@ -1687,13 +1655,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has been disabled$/
|
||||
*
|
||||
* @param string|null $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has been disabled')]
|
||||
public function adminHasDisabledUserUsingTheProvisioningApi(?string $user): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
if (OcHelper::isTestingOnReva()) {
|
||||
@@ -1742,7 +1710,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^group "([^"]*)" has been deleted$/
|
||||
*
|
||||
* @param string $group
|
||||
*
|
||||
@@ -1750,6 +1717,7 @@ trait Provisioning {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('group :group has been deleted')]
|
||||
public function groupHasBeenDeleted(string $group): void {
|
||||
if ($this->isTestingWithLdap()) {
|
||||
$this->deleteLdapGroup($group);
|
||||
@@ -1795,7 +1763,6 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has been removed from group :group
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $group
|
||||
@@ -1803,6 +1770,7 @@ trait Provisioning {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has been removed from group :group')]
|
||||
public function adminHasRemovedUserFromGroup(string $user, string $group): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
if ($this->isTestingWithLdap()
|
||||
@@ -1836,13 +1804,13 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the users returned by the API should be$/
|
||||
*
|
||||
* @param TableNode $usersList
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the users returned by the API should be')]
|
||||
public function theUsersShouldBe(TableNode $usersList): void {
|
||||
$this->verifyTableNodeColumnsCount($usersList, 1);
|
||||
$users = $usersList->getRows();
|
||||
@@ -1906,11 +1874,11 @@ trait Provisioning {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the API should not return any data$/
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the API should not return any data')]
|
||||
public function theApiShouldNotReturnAnyData(): void {
|
||||
$responseData = HttpRequestHelper::getResponseXml($this->response, __METHOD__)->data[0];
|
||||
Assert::assertEmpty(
|
||||
|
||||
@@ -27,6 +27,9 @@ use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use TestHelpers\UploadHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -60,37 +63,35 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public downloads the last public link shared file using the public WebDAV API$/
|
||||
* @When /^the public tries to download the last public link shared file using the public WebDAV API$/
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public tries to download the last public link shared file using the public WebDAV API')]
|
||||
public function downloadPublicFile(): void {
|
||||
$response = $this->downloadPublicFileWithRange("");
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public downloads the last public link shared file with password "([^"]*)" using the public WebDAV API$/
|
||||
* @When /^the public tries to download the last public link shared file with password "([^"]*)" using the public WebDAV API$/
|
||||
*
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public tries to download the last public link shared file with password :password using the public WebDAV API')]
|
||||
public function downloadPublicFileWithPassword(string $password): void {
|
||||
$response = $this->downloadPublicFileWithRange("", $password);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" tries to download file "([^"]*)" from the last public link using own basic auth and public WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user tries to download file :path from the last public link using own basic auth and public WebDAV API')]
|
||||
public function userTriesToDownloadFileFromPublicLinkUsingBasicAuthAndPublicWebdav(
|
||||
string $user,
|
||||
string $path
|
||||
@@ -100,12 +101,12 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public deletes (?:file|folder|entry) "([^"]*)" from the last public link share using the public WebDAV API$/
|
||||
*
|
||||
* @param string $fileName
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^the public deletes (?:file|folder|entry) "([^"]*)" from the last public link share using the public WebDAV API$/')]
|
||||
public function thePublicDeletesFileFolderFromTheLastPublicLinkShareUsingThePublicWebdavApi(
|
||||
string $fileName
|
||||
): void {
|
||||
@@ -147,13 +148,13 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^the public has deleted (?:file|folder|entry) "([^"]*)" from the last link share with password "([^"]*)" using the public WebDAV API$/
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('/^the public has deleted (?:file|folder|entry) "([^"]*)" from the last link share with password "([^"]*)" using the public WebDAV API$/')]
|
||||
public function thePublicHasDeletedFileFromTheLastLinkShareWithPasswordUsingPublicWebdavApi(
|
||||
string $file,
|
||||
string $password
|
||||
@@ -163,13 +164,13 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public deletes (?:file|folder|entry) "([^"]*)" from the last link share with password "([^"]*)" using the public WebDAV API$/
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^the public deletes (?:file|folder|entry) "([^"]*)" from the last link share with password "([^"]*)" using the public WebDAV API$/')]
|
||||
public function thePublicDeletesFileFromTheLastLinkShareWithPasswordUsingPublicWebdavApi(
|
||||
string $file,
|
||||
string $password
|
||||
@@ -219,7 +220,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public renames (?:file|folder|entry) "([^"]*)" to "([^"]*)" from the last public link share using the password "([^"]*)" and the public WebDAV API$/
|
||||
*
|
||||
* @param string $fileName
|
||||
* @param string $toName
|
||||
@@ -227,6 +227,7 @@ class PublicWebDavContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^the public renames (?:file|folder|entry) "([^"]*)" to "([^"]*)" from the last public link share using the password "([^"]*)" and the public WebDAV API$/')]
|
||||
public function thePublicRenamesFileFromTheLastPublicShareUsingThePasswordPasswordAndOldPublicWebdavApi(
|
||||
string $fileName,
|
||||
string $toName,
|
||||
@@ -239,14 +240,14 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public downloads file "([^"]*)" from inside the last public link shared folder with password "([^"]*)" using the public WebDAV API$/
|
||||
* @When /^the public tries to download file "([^"]*)" from inside the last public link shared folder with password "([^"]*)" using the public WebDAV API$/
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public downloads file :path from inside the last public link shared folder with password :password using the public WebDAV API')]
|
||||
#[When('the public tries to download file :path from inside the last public link shared folder with password :password using the public WebDAV API')]
|
||||
public function publicDownloadsFileFromInsideLastPublicSharedFolderWithPassword(
|
||||
string $path,
|
||||
string $password = ""
|
||||
@@ -376,13 +377,13 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public copies (?:file|folder) "([^"]*)" to "([^"]*)" using the public WebDAV API$/
|
||||
*
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^the public copies (?:file|folder) "([^"]*)" to "([^"]*)" using the public WebDAV API$/')]
|
||||
public function thePublicCopiesFileUsingTheWebDAVApi(string $source, string $destination): void {
|
||||
$token = ($this->featureContext->isUsingSharingNG())
|
||||
? $this->featureContext->shareNgGetLastCreatedLinkShareToken()
|
||||
@@ -424,7 +425,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^the public has uploaded file "([^"]*)" with content "([^"]*)" and password "([^"]*)" to the last link share using the public WebDAV API$/
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $content
|
||||
@@ -432,6 +432,7 @@ class PublicWebDavContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('the public has uploaded file :filename with content :content and password :password to the last link share using the public WebDAV API')]
|
||||
public function thePublicHasUploadedFileWithContentAndPasswordToLastLinkShareUsingPublicWebdavApi(
|
||||
string $filename,
|
||||
string $content = 'test',
|
||||
@@ -446,7 +447,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public uploads file "([^"]*)" with password "([^"]*)" and content "([^"]*)" using the public WebDAV API$/
|
||||
*
|
||||
* @param string $filename target file name
|
||||
* @param string $password
|
||||
@@ -454,6 +454,7 @@ class PublicWebDavContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public uploads file :filename with password :password and content :body using the public WebDAV API')]
|
||||
public function thePublicUploadsFileWithPasswordAndContentUsingPublicWebDAVApi(
|
||||
string $filename,
|
||||
string $password,
|
||||
@@ -468,26 +469,26 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public overwrites file :filename with content :body using the public WebDAV API
|
||||
*
|
||||
* @param string $filename target file name
|
||||
* @param string $body content to upload
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public overwrites file :filename with content :body using the public WebDAV API')]
|
||||
public function thePublicOverwritesFileWithContentUsingWebDavApi(string $filename, string $body): void {
|
||||
$response = $this->publicUploadContent($filename, '', $body);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public uploads file "([^"]*)" with content "([^"]*)" using the public WebDAV API$/
|
||||
*
|
||||
* @param string $filename target file name
|
||||
* @param string $body content to upload
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public uploads file :filename with content :body using the public WebDAV API')]
|
||||
public function thePublicUploadsFileWithContentUsingThePublicWebDavApi(
|
||||
string $filename,
|
||||
string $body = 'test'
|
||||
@@ -498,20 +499,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the public has uploaded file :filename with content :body
|
||||
*
|
||||
* @param string $filename target file name
|
||||
* @param string $body content to upload
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function thePublicHasUploadedFileWithContent(string $filename, string $body): void {
|
||||
$response = $this->publicUploadContent($filename, '', $body);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe([201, 204], "", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public should be able to download the last publicly shared file using the public WebDAV API with password "([^"]*)" and the content should be "([^"]*)"$/
|
||||
*
|
||||
* @param string $password
|
||||
* @param string $expectedContent
|
||||
@@ -519,6 +506,7 @@ class PublicWebDavContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the public should be able to download the last publicly shared file using the public WebDAV API with password :password and the content should be :expectedContent')]
|
||||
public function checkLastPublicSharedFileWithPasswordDownload(
|
||||
string $password,
|
||||
string $expectedContent
|
||||
@@ -538,14 +526,13 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public should not be able to download file "([^"]*)" from inside the last public link shared folder using the public WebDAV API without a password$/
|
||||
* @Then /^the public download of file "([^"]*)" from inside the last public link shared folder using the public WebDAV API should fail with HTTP status code "([^"]*)"$/
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $expectedHttpCode
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the public should not be able to download file :path from inside the last public link shared folder using the public WebDAV API without a password')]
|
||||
public function shouldNotBeAbleToDownloadFileInsidePublicSharedFolder(
|
||||
string $path,
|
||||
string $expectedHttpCode = "401"
|
||||
@@ -560,13 +547,13 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public should be able to download file "([^"]*)" from inside the last public link shared folder using the public WebDAV API with password "([^"]*)"$/
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the public should be able to download file :path from inside the last public link shared folder using the public WebDAV API with password :password')]
|
||||
public function shouldBeAbleToDownloadFileInsidePublicSharedFolderWithPassword(
|
||||
string $path,
|
||||
string $password
|
||||
@@ -581,7 +568,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public should be able to download file "([^"]*)" from inside the last public link shared folder using the public WebDAV API with password "([^"]*)" and the content should be "([^"]*)"$/
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $password
|
||||
@@ -590,6 +576,7 @@ class PublicWebDavContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the public should be able to download file :path from inside the last public link shared folder using the public WebDAV API with password :password and the content should be :content')]
|
||||
public function shouldBeAbleToDownloadFileInsidePublicSharedFolderWithPasswordAndContentShouldBe(
|
||||
string $path,
|
||||
string $password,
|
||||
@@ -606,7 +593,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public should be able to download file "([^"]*)" from the last link share with password "([^"]*)" and the content should be "([^"]*)"$/
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $password
|
||||
@@ -615,6 +601,7 @@ class PublicWebDavContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the public should be able to download file :path from the last link share with password :password and the content should be :content')]
|
||||
public function shouldBeAbleToDownloadFileInsidePublicSharedFolderWithPasswordForSharingNGAndContentShouldBe(
|
||||
string $path,
|
||||
string $password,
|
||||
@@ -632,8 +619,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public should not be able to download file "([^"]*)" from inside the last public link shared folder using the public WebDAV API with password "([^"]*)"$/
|
||||
* @Then /^the public download of file "([^"]*)" from inside the last public link shared folder using the public WebDAV API with password "([^"]*)" should fail with HTTP status code "([^"]*)"$/
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $password
|
||||
@@ -641,6 +626,7 @@ class PublicWebDavContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the public should not be able to download file :path from inside the last public link shared folder using the public WebDAV API with password :password')]
|
||||
public function shouldNotBeAbleToDownloadFileInsidePublicSharedFolderWithPassword(
|
||||
string $path,
|
||||
string $password,
|
||||
@@ -656,7 +642,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public download of file "([^"]*)" from the last link share with password "([^"]*)" should fail with HTTP status code "([^"]*)" using shareNg$/
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $password
|
||||
@@ -664,6 +649,7 @@ class PublicWebDavContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the public download of file :path from the last link share with password :password should fail with HTTP status code :expectedHttpCode using shareNg')]
|
||||
public function shouldNotBeAbleToDownloadFileWithPasswordForShareNg(
|
||||
string $path,
|
||||
string $password,
|
||||
@@ -704,7 +690,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public upload to the last publicly shared file using the public WebDAV API with password "([^"]*)" should (?:fail|pass) with HTTP status code "([^"]*)"$/
|
||||
*
|
||||
* @param string $password
|
||||
* @param string $expectedHttpCode
|
||||
@@ -712,6 +697,7 @@ class PublicWebDavContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the public upload to the last publicly shared file using the public WebDAV API with password "([^"]*)" should (?:fail|pass) with HTTP status code "([^"]*)"$/')]
|
||||
public function publiclyUploadingShouldToSharedFileShouldFail(
|
||||
string $password,
|
||||
string $expectedHttpCode
|
||||
@@ -727,13 +713,13 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public upload to the last publicly shared folder using the public WebDAV API with password "([^"]*)" should fail with HTTP status code "([^"]*)"$/
|
||||
*
|
||||
* @param string $password
|
||||
* @param string|null $expectedHttpCode
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the public upload to the last publicly shared folder using the public WebDAV API with password :password should fail with HTTP status code :expectedHttpCode')]
|
||||
public function publiclyUploadingWithPasswordShouldNotWork(
|
||||
string $password,
|
||||
string $expectedHttpCode = null
|
||||
@@ -750,13 +736,13 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public should be able to upload file "([^"]*)" into the last public link shared folder using the public WebDAV API with password "([^"]*)"$/
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the public should be able to upload file :filename into the last public link shared folder using the public WebDAV API with password :password')]
|
||||
public function publiclyUploadingIntoFolderWithPasswordShouldWork(
|
||||
string $filename,
|
||||
string $password
|
||||
@@ -770,13 +756,13 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^uploading a file with password "([^"]*)" should work using the public WebDAV API$/
|
||||
*
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('uploading a file with password :password should work using the public WebDAV API')]
|
||||
public function publiclyUploadingShouldWork(string $password): void {
|
||||
$path = "whateverfilefortesting-publicWebDAVAPI.txt";
|
||||
$content = "test";
|
||||
@@ -802,7 +788,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^uploading content to a public link shared file with password "([^"]*)" should (not|)\s?work using the public WebDAV API$/
|
||||
*
|
||||
* @param string $password
|
||||
* @param string $shouldOrNot (not|)
|
||||
@@ -810,6 +795,7 @@ class PublicWebDavContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^uploading content to a public link shared file with password "([^"]*)" should (not|)\\s?work using the public WebDAV API$/')]
|
||||
public function publiclyUploadingToPublicLinkSharedFileShouldWork(
|
||||
string $password,
|
||||
string $shouldOrNot,
|
||||
@@ -851,13 +837,13 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public uploads file :source to :destination inside last link shared folder using the public WebDAV API
|
||||
*
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public uploads file :source to :destination inside last link shared folder using the public WebDAV API')]
|
||||
public function thePublicUploadsFileToInsideLastLinkSharedFolderUsingThePublicWebdavApi(
|
||||
string $source,
|
||||
string $destination,
|
||||
@@ -875,7 +861,6 @@ class PublicWebDavContext implements Context {
|
||||
|
||||
/**
|
||||
*
|
||||
* @When the public uploads file :source to :destination inside last link shared folder with password :password using the public WebDAV API
|
||||
*
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
@@ -883,6 +868,7 @@ class PublicWebDavContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public uploads file :source to :destination inside last link shared folder with password :password using the public WebDAV API')]
|
||||
public function thePublicUploadsFileToInsideLastLinkSharedFolderWithPasswordUsingThePublicWebdavApi(
|
||||
string $source,
|
||||
string $destination,
|
||||
@@ -900,7 +886,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public uploads file :fileName to the last public link shared folder with password :password with mtime :mtime using the public WebDAV API
|
||||
*
|
||||
* @param string $fileName
|
||||
* @param string $password
|
||||
@@ -909,6 +894,7 @@ class PublicWebDavContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('the public uploads file :fileName to the last public link shared folder with password :password with mtime :mtime using the public WebDAV API')]
|
||||
public function thePublicUploadsFileToLastSharedFolderWithMtimeUsingTheWebdavApi(
|
||||
string $fileName,
|
||||
string $password,
|
||||
@@ -964,57 +950,17 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public creates folder :destination using the public WebDAV API
|
||||
*
|
||||
* @param String $destination
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public creates folder :destination using the public WebDAV API')]
|
||||
public function publicCreatesFolder(string $destination): void {
|
||||
$this->featureContext->setResponse($this->publicCreatesFolderUsingPassword($destination, ''));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public should be able to create folder "([^"]*)" in the last public link shared folder using the new public WebDAV API with password "([^"]*)"$/
|
||||
*
|
||||
* @param string $foldername
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function publicShouldBeAbleToCreateFolderWithPassword(
|
||||
string $foldername,
|
||||
string $password
|
||||
): void {
|
||||
$response = $this->publicCreatesFolderUsingPassword($foldername, $password);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(201, "", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the public creation of folder "([^"]*)" in the last public link shared folder using the new public WebDAV API with password "([^"]*)" should fail with HTTP status code "([^"]*)"$/
|
||||
*
|
||||
* @param string $foldername
|
||||
* @param string $password
|
||||
* @param string $expectedHttpCode
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function publicCreationOfFolderWithPasswordShouldFail(
|
||||
string $foldername,
|
||||
string $password,
|
||||
string $expectedHttpCode
|
||||
): void {
|
||||
$response = $this->publicCreatesFolderUsingPassword($foldername, $password);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(
|
||||
$expectedHttpCode,
|
||||
"creation of $foldername in the last publicly shared folder should have failed with code " .
|
||||
$expectedHttpCode,
|
||||
$response
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the mtime of file :fileName in the last shared public link using the WebDAV API should be :mtime
|
||||
*
|
||||
* @param string $fileName
|
||||
* @param string $mtime
|
||||
@@ -1022,6 +968,7 @@ class PublicWebDavContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the mtime of file :fileName in the last shared public link using the WebDAV API should be :mtime')]
|
||||
public function theMtimeOfFileInTheLastSharedPublicLinkUsingTheWebdavApiShouldBe(
|
||||
string $fileName,
|
||||
string $mtime
|
||||
@@ -1044,32 +991,6 @@ class PublicWebDavContext implements Context {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the mtime of file :fileName in the last shared public link using the WebDAV API should not be :mtime
|
||||
*
|
||||
* @param string $fileName
|
||||
* @param string $mtime
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theMtimeOfFileInTheLastSharedPublicLinkUsingTheWebdavApiShouldNotBe(
|
||||
string $fileName,
|
||||
string $mtime
|
||||
): void {
|
||||
$token = $this->featureContext->getLastCreatedPublicShareToken();
|
||||
$baseUrl = $this->featureContext->getBaseUrl();
|
||||
Assert::assertNotEquals(
|
||||
$mtime,
|
||||
WebDavHelper::getMtimeOfFileInPublicLinkShare(
|
||||
$baseUrl,
|
||||
$fileName,
|
||||
$token,
|
||||
$this->featureContext->getStepLineRef()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Uploads a file through the public WebDAV API and sets the response in FeatureContext
|
||||
*
|
||||
@@ -1158,7 +1079,6 @@ class PublicWebDavContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public sends "([^"]*)" request to the last public link share using the public WebDAV API(?: with password "([^"]*)")?$/
|
||||
*
|
||||
* @param string $method
|
||||
* @param string|null $password
|
||||
@@ -1166,6 +1086,7 @@ class PublicWebDavContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('/^the public sends "([^"]*)" request to the last public link share using the public WebDAV API(?: with password "([^"]*)")?$/')]
|
||||
public function publicSendsRequestToLastPublicShare(string $method, ?string $password = ''): void {
|
||||
if ($method === "PROPFIND") {
|
||||
$body = '<?xml version="1.0"?>
|
||||
|
||||
@@ -27,6 +27,8 @@ use Psr\Http\Message\ResponseInterface;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -126,10 +128,6 @@ class SearchContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user searches for :pattern using the WebDAV API
|
||||
* @When user :user searches for :pattern and limits the results to :limit items using the WebDAV API
|
||||
* @When user :user searches for :pattern using the WebDAV API requesting these properties:
|
||||
* @When user :user searches for :pattern and limits the results to :limit items using the WebDAV API requesting these properties:
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $pattern
|
||||
@@ -139,6 +137,9 @@ class SearchContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[When('user :user searches for :pattern using the WebDAV API')]
|
||||
#[When('user :user searches for :pattern and limits the results to :limit items using the WebDAV API')]
|
||||
#[When('user :user searches for :pattern using the WebDAV API requesting these properties:')]
|
||||
public function userSearchesUsingWebDavAPI(
|
||||
string $user,
|
||||
string $pattern,
|
||||
@@ -153,7 +154,6 @@ class SearchContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then file/folder :path in the search result of user :user should contain these properties:
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $user
|
||||
@@ -162,6 +162,7 @@ class SearchContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('file/folder :path in the search result of user :user should contain these properties:')]
|
||||
public function fileOrFolderInTheSearchResultShouldContainProperties(
|
||||
string $path,
|
||||
string $user,
|
||||
@@ -216,7 +217,6 @@ class SearchContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the search result should contain these (?:files|entries) with highlight on keyword "([^"]*)"/
|
||||
*
|
||||
* @param TableNode $expectedFiles
|
||||
* @param string $expectedContent
|
||||
@@ -225,6 +225,7 @@ class SearchContext implements Context {
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the search result should contain these (?:files|entries) with highlight on keyword "([^"]*)"/')]
|
||||
public function theSearchResultShouldContainEntriesWithHighlight(
|
||||
TableNode $expectedFiles,
|
||||
string $expectedContent
|
||||
@@ -253,8 +254,6 @@ class SearchContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" searches for "([^"]*)" inside (folder|space) "([^"]*)" using the WebDAV API$/
|
||||
* @When /^user "([^"]*)" searches for "([^"]*)" inside (folder) "([^"]*)" in space "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $pattern
|
||||
@@ -265,6 +264,8 @@ class SearchContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[When('/^user "([^"]*)" searches for "([^"]*)" inside (folder|space) "([^"]*)" using the WebDAV API$/')]
|
||||
#[When('/^user "([^"]*)" searches for "([^"]*)" inside (folder) "([^"]*)" in space "([^"]*)" using the WebDAV API$/')]
|
||||
public function userSearchesInsideFolderOrSpaceUsingWebDavAPI(
|
||||
string $user,
|
||||
string $pattern,
|
||||
|
||||
@@ -16,6 +16,9 @@ use Psr\Http\Message\ResponseInterface;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\SettingsHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -60,7 +63,6 @@ class SettingsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" tries to get all existing roles using the settings API$/
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
@@ -69,6 +71,7 @@ class SettingsContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user tries to get all existing roles using the settings API')]
|
||||
public function getAllExistingRoles(string $user): void {
|
||||
$response = $this->getRoles($user);
|
||||
$this->featureContext->setResponse($response);
|
||||
@@ -115,7 +118,6 @@ class SettingsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^the administrator has given "([^"]*)" the role "([^"]*)" using the settings api$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $role
|
||||
@@ -124,6 +126,7 @@ class SettingsContext implements Context {
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('the administrator has given :user the role :role using the settings api')]
|
||||
public function theAdministratorHasGivenUserTheRole(string $user, string $role): void {
|
||||
$admin = $this->featureContext->getAdminUserName();
|
||||
$roleId = $this->getRoleIdByRoleName($admin, $role);
|
||||
@@ -137,7 +140,6 @@ class SettingsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :assigner assigns the role :role to user :assignee using the settings API
|
||||
*
|
||||
* @param string $assigner
|
||||
* @param string $role
|
||||
@@ -147,6 +149,7 @@ class SettingsContext implements Context {
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :assigner assigns the role :role to user :assignee using the settings API')]
|
||||
public function userAssignsTheRoleToUserUsingTheSettingsApi(
|
||||
string $assigner,
|
||||
string $role,
|
||||
@@ -218,42 +221,6 @@ class SettingsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" changes his own role to "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $role
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function userChangeOwnRole(string $user, string $role): void {
|
||||
// we assume that the user knows uuid role.
|
||||
$roleId = $this->getRoleIdByRoleName($this->featureContext->getAdminUserName(), $role);
|
||||
$userId = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$response = $this->assignRoleToUser($user, $userId, $roleId);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" changes the role "([^"]*)" for user "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $role
|
||||
* @param string $assignedUser
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function userChangeRoleAnotherUser(string $user, string $role, string $assignedUser): void {
|
||||
// we assume that the user knows uuid role.
|
||||
$roleId = $this->getRoleIdByRoleName($this->featureContext->getAdminUserName(), $role);
|
||||
$userId = $this->featureContext->getAttributeOfCreatedUser($assignedUser, 'id');
|
||||
$response = $this->assignRoleToUser($user, $userId, $roleId);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" tries to get list of assignment using the settings API$/
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
@@ -262,13 +229,13 @@ class SettingsContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user tries to get list of assignment using the settings API')]
|
||||
public function userGetAssignmentsList(string $user): void {
|
||||
$userId = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$this->featureContext->setResponse($this->getAssignmentsList($user, $userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should have the role "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $role
|
||||
@@ -278,6 +245,7 @@ class SettingsContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('user :user should have the role :role')]
|
||||
public function userShouldHaveRole(string $user, string $role): void {
|
||||
$userId = $this->featureContext->getAttributeOfCreatedUser($user, 'id');
|
||||
$response = $this->getAssignmentsList($this->featureContext->getAdminUserName(), $userId);
|
||||
@@ -295,7 +263,6 @@ class SettingsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the setting API response should have the role "([^"]*)"$/
|
||||
*
|
||||
* @param string $role
|
||||
*
|
||||
@@ -303,6 +270,7 @@ class SettingsContext implements Context {
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the setting API response should have the role :role')]
|
||||
public function theSettingApiResponseShouldHaveTheRole(string $role): void {
|
||||
$assignmentRoleId = $this->featureContext->getJsonDecodedResponse(
|
||||
$this->featureContext->getResponse()
|
||||
@@ -370,7 +338,6 @@ class SettingsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" lists values-list with headers using the Settings API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $headersTable
|
||||
@@ -380,6 +347,7 @@ class SettingsContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user lists values-list with headers using the Settings API')]
|
||||
public function theUserListsAllValuesListWithHeadersUsingSettingsApi(string $user, TableNode $headersTable): void {
|
||||
$this->featureContext->verifyTableNodeColumns(
|
||||
$headersTable,
|
||||
@@ -446,7 +414,6 @@ class SettingsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has switched the system language to "([^"]*)" using the settings API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $language
|
||||
@@ -456,6 +423,7 @@ class SettingsContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has switched the system language to :language using the settings API')]
|
||||
public function theUserHasSwitchedSystemLanguage(string $user, string $language): void {
|
||||
$response = $this->sendRequestToSwitchSystemLanguage($user, $language);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(
|
||||
@@ -466,7 +434,6 @@ class SettingsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user switches the system language to :language using the settings API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $language
|
||||
@@ -476,6 +443,7 @@ class SettingsContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user switches the system language to :language using the settings API')]
|
||||
public function userSwitchesTheSystemLanguageUsingTheSettingsApi(string $user, string $language): void {
|
||||
$response = $this->sendRequestToSwitchSystemLanguage($user, $language);
|
||||
$this->featureContext->setResponse($response);
|
||||
@@ -515,8 +483,6 @@ class SettingsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has disabled auto-accepting
|
||||
* @Given user :user has disabled the auto-sync share
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
@@ -525,6 +491,8 @@ class SettingsContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has disabled auto-accepting')]
|
||||
#[Given('user :user has disabled the auto-sync share')]
|
||||
public function theUserHasDisabledAutoAccepting(string $user): void {
|
||||
$response = $this->sendRequestToDisableAutoAccepting($user);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(
|
||||
@@ -536,7 +504,6 @@ class SettingsContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user disables the auto-sync share using the settings API
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
@@ -545,6 +512,7 @@ class SettingsContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user disables the auto-sync share using the settings API')]
|
||||
public function userDisablesAutoAcceptingUsingSettingsApi(string $user): void {
|
||||
$response = $this->sendRequestToDisableAutoAccepting($user);
|
||||
$this->featureContext->setResponse($response);
|
||||
|
||||
@@ -27,6 +27,8 @@ use Psr\Http\Message\ResponseInterface;
|
||||
use PHPUnit\Framework\Assert;
|
||||
use TestHelpers\BehatHelper;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -38,13 +40,13 @@ class ShareesContext implements Context {
|
||||
private OCSContext $ocsContext;
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the sharees using the sharing API with parameters$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user gets the sharees using the sharing API with parameters')]
|
||||
public function userGetsTheShareesWithParameters(string $user, TableNode $body): void {
|
||||
$this->featureContext->setResponse(
|
||||
$this->getShareesWithParameters(
|
||||
@@ -55,7 +57,6 @@ class ShareesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the "([^"]*)" sharees returned should be$/
|
||||
*
|
||||
* @param string $shareeType
|
||||
* @param TableNode $shareesList
|
||||
@@ -63,6 +64,7 @@ class ShareesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the :shareeType sharees returned should be')]
|
||||
public function theShareesReturnedShouldBe(string $shareeType, TableNode $shareesList): void {
|
||||
$this->featureContext->verifyTableNodeColumnsCount($shareesList, 4);
|
||||
$sharees = $shareesList->getRows();
|
||||
@@ -78,37 +80,12 @@ class ShareesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the "([^"]*)" sharees returned should include$/
|
||||
*
|
||||
* @param string $shareeType
|
||||
* @param TableNode $shareesList
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theShareesReturnedShouldInclude(string $shareeType, TableNode $shareesList): void {
|
||||
$this->featureContext->verifyTableNodeColumnsCount($shareesList, 3);
|
||||
$sharees = $shareesList->getRows();
|
||||
$respondedArray = $this->getArrayOfShareesResponded(
|
||||
$this->featureContext->getResponse(),
|
||||
$shareeType
|
||||
);
|
||||
foreach ($sharees as $sharee) {
|
||||
Assert::assertContains(
|
||||
$sharee,
|
||||
$respondedArray,
|
||||
"Returned sharees do not match the expected ones. See the differences below."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the "([^"]*)" sharees returned should be empty$/
|
||||
*
|
||||
* @param string $shareeType
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the :shareeType sharees returned should be empty')]
|
||||
public function theShareesReturnedShouldBeEmpty(string $shareeType): void {
|
||||
$respondedArray = $this->getArrayOfShareesResponded(
|
||||
$this->featureContext->getResponse(),
|
||||
|
||||
@@ -30,6 +30,9 @@ use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\TranslationHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
/**
|
||||
* Sharing trait
|
||||
@@ -213,7 +216,7 @@ trait Sharing {
|
||||
throw new Error(
|
||||
'Response did not contain share id '
|
||||
. $this->getJsonDecodedResponse($lastResponse)['link']['webUrl']
|
||||
. ' for the created public link'
|
||||
. ' for the created public link'
|
||||
);
|
||||
}
|
||||
$last_created_link_webURL = $this->getJsonDecodedResponse($lastResponse)['link']['webUrl'];
|
||||
@@ -389,7 +392,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" creates a share using the sharing API with settings$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode|null $body {@link createShareWithSettings}
|
||||
@@ -397,6 +399,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user creates a share using the sharing API with settings')]
|
||||
public function userCreatesAShareWithSettings(string $user, ?TableNode $body): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
$response = $this->createShareWithSettings(
|
||||
@@ -422,7 +425,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" creates a public link share using the sharing API with settings$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -430,6 +432,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user creates a public link share using the sharing API with settings')]
|
||||
public function userCreatesAPublicLinkShareWithSettings(string $user, TableNode $body): void {
|
||||
$this->setResponse($this->createPublicLinkShare($user, $body));
|
||||
$this->pushToLastStatusCodesArrays();
|
||||
@@ -572,7 +575,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" updates the last share using the sharing API with$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode|null $body
|
||||
@@ -580,13 +582,13 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user updates the last share using the sharing API with')]
|
||||
public function userUpdatesTheLastShareWith(string $user, ?TableNode $body): void {
|
||||
$this->setResponse($this->updateLastShareWithSettings($user, $body));
|
||||
$this->pushToLastStatusCodesArrays();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" updates the last public link share using the sharing API with$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode|null $body
|
||||
@@ -594,13 +596,13 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user updates the last public link share using the sharing API with')]
|
||||
public function userUpdatesTheLastPublicLinkShareWith(string $user, ?TableNode $body): void {
|
||||
$this->response = $this->updateLastShareWithSettings($user, $body, null, true);
|
||||
$this->pushToLastStatusCodesArrays();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has updated the last share with$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode|null $body
|
||||
@@ -608,6 +610,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has updated the last share with')]
|
||||
public function userHasUpdatedTheLastShareWith(string $user, ?TableNode $body): void {
|
||||
$response = $this->updateLastShareWithSettings($user, $body);
|
||||
$this->theHTTPStatusCodeShouldBeBetween(200, 299, $response);
|
||||
@@ -803,10 +806,10 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then no files or folders should be included in the response
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('no files or folders should be included in the response')]
|
||||
public function checkNoFilesFoldersInResponse(): void {
|
||||
$data = HttpRequestHelper::getResponseXml($this->response, __METHOD__)->data[0];
|
||||
Assert::assertIsObject($data, __METHOD__ . " data not found in response XML");
|
||||
@@ -814,12 +817,12 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then exactly :count file/files or folder/folders should be included in the response
|
||||
*
|
||||
* @param string $count
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('exactly :count file/files or folder/folders should be included in the response')]
|
||||
public function checkCountFilesFoldersInResponse(string $count): void {
|
||||
$count = (int) $count;
|
||||
$data = HttpRequestHelper::getResponseXml($this->response, __METHOD__)->data[0];
|
||||
@@ -828,13 +831,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(?:file|folder|entry) "([^"]*)" should be included in the response$/
|
||||
*
|
||||
* @param string $filename
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^(?:file|folder|entry) "([^"]*)" should be included in the response$/')]
|
||||
public function checkSharedFileInResponse(string $filename): void {
|
||||
$filename = "/" . \ltrim($filename, '/');
|
||||
Assert::assertTrue(
|
||||
@@ -844,13 +847,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(?:file|folder|entry) "([^"]*)" should not be included in the response$/
|
||||
*
|
||||
* @param string $filename
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^(?:file|folder|entry) "([^"]*)" should not be included in the response$/')]
|
||||
public function checkSharedFileNotInResponse(string $filename): void {
|
||||
$filename = "/" . \ltrim($filename, '/');
|
||||
Assert::assertFalse(
|
||||
@@ -860,13 +863,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(?:file|folder|entry) "([^"]*)" should be included as path in the response$/
|
||||
*
|
||||
* @param string $filename
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^(?:file|folder|entry) "([^"]*)" should be included as path in the response$/')]
|
||||
public function checkSharedFileAsPathInResponse(string $filename): void {
|
||||
$filename = "/" . \ltrim($filename, '/');
|
||||
Assert::assertTrue(
|
||||
@@ -876,13 +879,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(?:file|folder|entry) "([^"]*)" should not be included as path in the response$/
|
||||
*
|
||||
* @param string $filename
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^(?:file|folder|entry) "([^"]*)" should not be included as path in the response$/')]
|
||||
public function checkSharedFileAsPathNotInResponse(string $filename): void {
|
||||
$filename = "/" . \ltrim($filename, '/');
|
||||
Assert::assertFalse(
|
||||
@@ -892,7 +895,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(user|group) "([^"]*)" should be included in the response$/
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $user
|
||||
@@ -900,6 +902,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^(user|group) "([^"]*)" should be included in the response$/')]
|
||||
public function checkSharedUserOrGroupInResponse(string $type, string $user): void {
|
||||
if ($type === 'user') {
|
||||
$user = $this->getActualUsername($user);
|
||||
@@ -911,14 +914,14 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should not be included in the response$/
|
||||
* @Then /^group "([^"]*)" should not be included in the response$/
|
||||
*
|
||||
* @param string $userOrGroup
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('user :userOrGroup should not be included in the response')]
|
||||
#[Then('group :userOrGroup should not be included in the response')]
|
||||
public function checkSharedUserOrGroupNotInResponse(string $userOrGroup): void {
|
||||
Assert::assertFalse(
|
||||
$this->isFieldInResponse('share_with', "$userOrGroup", false),
|
||||
@@ -953,8 +956,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" shares (?:file|folder|entry) "([^"]*)" with user "([^"]*)"(?: with permissions (\d+))? using the sharing API$/
|
||||
* @When /^user "([^"]*)" shares (?:file|folder|entry) "([^"]*)" with user "([^"]*)" with permissions "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $filepath
|
||||
@@ -963,6 +964,8 @@ trait Sharing {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^user "([^"]*)" shares (?:file|folder|entry) "([^"]*)" with user "([^"]*)"(?: with permissions (\\d+))? using the sharing API$/')]
|
||||
#[When('/^user "([^"]*)" shares (?:file|folder|entry) "([^"]*)" with user "([^"]*)" with permissions "([^"]*)" using the sharing API$/')]
|
||||
public function userSharesFileWithUserUsingTheSharingApi(
|
||||
string $sharer,
|
||||
string $filepath,
|
||||
@@ -980,8 +983,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" shares the following (?:files|folders|entries) with user "([^"]*)"(?: with permissions (\d+))? using the sharing API$/
|
||||
* @When /^user "([^"]*)" shares the following (?:files|folders|entries) with user "([^"]*)" with permissions "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $sharee
|
||||
@@ -991,6 +992,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" shares the following (?:files|folders|entries) with user "([^"]*)" using the sharing API$/')]
|
||||
public function userSharesTheFollowingFilesWithUserUsingTheSharingApi(
|
||||
string $sharer,
|
||||
string $sharee,
|
||||
@@ -1012,31 +1014,6 @@ trait Sharing {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the user shares (?:file|folder|entry) "([^"]*)" with user "([^"]*)"(?: with permissions (\d+))? using the sharing API$/
|
||||
* @When /^the user shares (?:file|folder|entry) "([^"]*)" with user "([^"]*)" with permissions "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $filepath
|
||||
* @param string $user2
|
||||
* @param string|int|string[]|int[] $permissions
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function theUserSharesFileWithUserUsingTheSharingApi(
|
||||
string $filepath,
|
||||
string $user2,
|
||||
$permissions = null
|
||||
) {
|
||||
$response = $this->createAUserShare(
|
||||
$this->getCurrentUser(),
|
||||
$filepath["path"],
|
||||
$this->getActualUsername($user2),
|
||||
$permissions
|
||||
);
|
||||
$this->setResponse($response);
|
||||
$this->pushToLastStatusCodesArrays();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $user
|
||||
@@ -1064,8 +1041,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" shares (?:file|folder|entry) "([^"]*)" with group "([^"]*)" with permissions "([^"]*)" using the sharing API$/
|
||||
* @When /^user "([^"]*)" shares (?:file|folder|entry) "([^"]*)" with group "([^"]*)"(?: with permissions (\d+))? using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $filepath
|
||||
@@ -1074,6 +1049,8 @@ trait Sharing {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^user "([^"]*)" shares (?:file|folder|entry) "([^"]*)" with group "([^"]*)" with permissions "([^"]*)" using the sharing API$/')]
|
||||
#[When('/^user "([^"]*)" shares (?:file|folder|entry) "([^"]*)" with group "([^"]*)"(?: with permissions (\\d+))? using the sharing API$/')]
|
||||
public function userSharesFileWithGroupUsingTheSharingApi(
|
||||
string $user,
|
||||
string $filepath,
|
||||
@@ -1091,8 +1068,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" shares the following (?:files|folders|entries) with group "([^"]*)"(?: with permissions (\d+))? using the sharing API$/
|
||||
* @When /^user "([^"]*)" shares the following (?:files|folders|entries) with group "([^"]*)" with permissions "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $group
|
||||
@@ -1102,6 +1077,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" shares the following (?:files|folders|entries) with group "([^"]*)" using the sharing API$/')]
|
||||
public function userSharesTheFollowingFilesWithGroupUsingTheSharingApi(
|
||||
string $user,
|
||||
string $group,
|
||||
@@ -1124,8 +1100,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should not be able to share (?:file|folder|entry) "([^"]*)" with (user|group) "([^"]*)"(?: with permissions (\d+))? using the sharing API$/
|
||||
* @Then /^user "([^"]*)" should not be able to share (?:file|folder|entry) "([^"]*)" with (user|group) "([^"]*)" with permissions "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $filepath
|
||||
@@ -1136,6 +1110,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^user "([^"]*)" should not be able to share (?:file|folder|entry) "([^"]*)" with (user|group) "([^"]*)" with permissions "([^"]*)" using the sharing API$/')]
|
||||
public function userTriesToShareFileUsingTheSharingApi(
|
||||
string $sharer,
|
||||
string $filepath,
|
||||
@@ -1161,8 +1136,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should be able to share (?:file|folder|entry) "([^"]*)" with (user|group) "([^"]*)"(?: with permissions (\d+))? using the sharing API$/
|
||||
* @Then /^user "([^"]*)" should be able to share (?:file|folder|entry) "([^"]*)" with (user|group) "([^"]*)" with permissions "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $filepath
|
||||
@@ -1173,6 +1146,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^user "([^"]*)" should be able to share (?:file|folder|entry) "([^"]*)" with (user|group) "([^"]*)" with permissions "([^"]*)" using the sharing API$/')]
|
||||
public function userShouldBeAbleToShareUsingTheSharingApi(
|
||||
string $sharer,
|
||||
string $filepath,
|
||||
@@ -1238,43 +1212,31 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" deletes the last share using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user deletes the last share using the sharing API')]
|
||||
public function userDeletesLastShareUsingTheSharingApi(string $user): void {
|
||||
$this->setResponse($this->deleteLastShareUsingSharingApi($user));
|
||||
$this->pushToLastStatusCodesArrays();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" deletes the last share of user "([^"]*)" using the sharing API$/
|
||||
* @When /^user "([^"]*)" tries to delete the last share of user "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $sharer
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user deletes the last share of user :sharer using the sharing API')]
|
||||
#[When('user :user tries to delete the last share of user :sharer using the sharing API')]
|
||||
public function userDeletesLastShareOfUserUsingTheSharingApi(string $user, string $sharer): void {
|
||||
$this->setResponse($this->deleteLastShareUsingSharingApi($user, $sharer));
|
||||
$this->pushToLastStatusCodesArrays();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has deleted the last share$/
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function userHasDeletedLastShareUsingTheSharingApi(string $user): void {
|
||||
$response = $this->deleteLastShareUsingSharingApi($user);
|
||||
$this->theHTTPStatusCodeShouldBeBetween(200, 299, $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
* @param string $shareType user|group|link
|
||||
@@ -1300,13 +1262,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the info of the last share using the sharing API$/
|
||||
*
|
||||
* @param string $user username that requests the information (might not be the user that has initiated the share)
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user gets the info of the last share using the sharing API')]
|
||||
public function userGetsInfoOfLastShareUsingTheSharingApi(string $user): void {
|
||||
$response = $this->getLastShareInfo($user, "user");
|
||||
$this->setResponse($response);
|
||||
@@ -1314,13 +1276,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the info of the last public link share using the sharing API$/
|
||||
*
|
||||
* @param string $user username that requests the information (might not be the user that has initiated the share)
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user gets the info of the last public link share using the sharing API')]
|
||||
public function userGetsInfoOfLastPublicLinkShareUsingTheSharingApi(string $user): void {
|
||||
$response = $this->getLastShareInfo($user, "link");
|
||||
$this->setResponse($response);
|
||||
@@ -1328,7 +1290,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as "([^"]*)" the info about the last share by user "([^"]*)" with user "([^"]*)" should include$/
|
||||
*
|
||||
* @param string $requester
|
||||
* @param string $sharer
|
||||
@@ -1338,6 +1299,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('as :requester the info about the last share by user :sharer with user :sharee should include')]
|
||||
public function asLastShareInfoAboutUserSharingWithUserShouldInclude(
|
||||
string $requester,
|
||||
string $sharer,
|
||||
@@ -1392,18 +1354,17 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user gets all the shares shared with him/her using the sharing API
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user gets all the shares shared with him/her using the sharing API')]
|
||||
public function userGetsAllTheSharesSharedWithHimUsingTheSharingApi(string $user): void {
|
||||
$this->setResponse($this->getSharedWithMeShares($user));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then as user :user the last share should include the following properties:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -1411,6 +1372,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('as user :user the last share should include the following properties:')]
|
||||
public function userGetsTheLastShareSharedWithHimUsingTheSharingApi(string $user, TableNode $table): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
$this->verifyTableNodeRows($table, [], $this->shareResponseFields);
|
||||
@@ -1436,7 +1398,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the (|pending)\s?(user|group|user and group|public link) shares shared with (?:him|her) using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $pending
|
||||
@@ -1444,6 +1405,7 @@ trait Sharing {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^user "([^"]*)" gets the (|pending)\\s?(user|group|user and group|public link) shares shared with (?:him|her) using the sharing API$/')]
|
||||
public function userGetsFilteredSharesSharedWithHimUsingTheSharingApi(
|
||||
string $user,
|
||||
string $pending,
|
||||
@@ -1474,13 +1436,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets all the shares shared with (?:him|her|them) that are received as (?:file|folder|entry) "([^"]*)" using the provisioning API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^user "([^"]*)" gets all the shares shared with (?:him|her|them) that are received as (?:file|folder|entry) "([^"]*)" using the provisioning API$/')]
|
||||
public function userGetsAllSharesSharedWithHimFromFileOrFolderUsingTheProvisioningApi(
|
||||
string $user,
|
||||
string $path
|
||||
@@ -1522,33 +1484,33 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets all shares shared by (?:him|her) using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^user "([^"]*)" gets all shares shared by (?:him|her) using the sharing API$/')]
|
||||
public function userGetsAllSharesSharedByHimUsingTheSharingApi(string $user): void {
|
||||
$this->setResponse($this->getAllshares($user));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the administrator gets all shares shared by (?:him|her) using the sharing API$/
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^the administrator gets all shares shared by (?:him|her) using the sharing API$/')]
|
||||
public function theAdministratorGetsAllSharesSharedByHimUsingTheSharingApi(): void {
|
||||
$this->setResponse($this->getAllShares($this->getAdminUsername()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the (user|group|user and group|public link) shares shared by (?:him|her) using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $shareType
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^user "([^"]*)" gets the (user|group|user and group|public link) shares shared by (?:him|her) using the sharing API$/')]
|
||||
public function userGetsFilteredSharesSharedByHimUsingTheSharingApi(string $user, string $shareType): void {
|
||||
if ($shareType === 'public link') {
|
||||
$shareType = 'public_link';
|
||||
@@ -1562,23 +1524,23 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user gets all the shares of the file :path using the sharing API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user gets all the shares of the file :path using the sharing API')]
|
||||
public function userGetsAllTheSharesFromTheFileUsingTheSharingApi(string $user, string $path): void {
|
||||
$this->setResponse($this->getAllShares($user, "?path=$path"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the last share_id should be included in the response/
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the last share_id should be included in the response/')]
|
||||
public function checkingLastShareIDIsIncluded(): void {
|
||||
$shareId = ($this->isUsingSharingNG())
|
||||
? $this->shareNgGetLastCreatedUserGroupShareID() : $this->getLastCreatedUserGroupShareId();
|
||||
@@ -1590,11 +1552,11 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the last share id should not be included in the response/
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the last share id should not be included in the response/')]
|
||||
public function checkLastShareIDIsNotIncluded(): void {
|
||||
$shareId = $this->isUsingSharingNG()
|
||||
? $this->shareNgGetLastCreatedUserGroupShareID() : $this->getLastCreatedUserGroupShareId();
|
||||
@@ -1636,13 +1598,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should not see the share id of the last share
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('user :user should not see the share id of the last share')]
|
||||
public function userShouldNotSeeShareIdOfLastShare(string $user): void {
|
||||
$response = $this->getSharedWithMeShares($user);
|
||||
$this->theHTTPStatusCodeShouldBe(200, "", $response);
|
||||
@@ -1656,12 +1618,12 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should not have any received shares
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('user :user should not have any received shares')]
|
||||
public function userShouldNotHaveAnyReceivedShares(string $user): void {
|
||||
$response = $this->getSharedWithMeShares($user);
|
||||
$this->theHTTPStatusCodeShouldBe(200, "", $response);
|
||||
@@ -1669,12 +1631,12 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the response should contain ([0-9]+) entries$/
|
||||
*
|
||||
* @param int $count
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('/^the response should contain ([0-9]+) entries$/')]
|
||||
public function checkingTheResponseEntriesCount(int $count): void {
|
||||
$actualCount = \count(HttpRequestHelper::getResponseXml($this->response, __METHOD__)->data[0]);
|
||||
Assert::assertEquals(
|
||||
@@ -1685,7 +1647,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the fields of the last response to user :user should include
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode|null $body
|
||||
@@ -1693,6 +1654,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the fields of the last response to user :user should include')]
|
||||
public function checkFields(string $user, ?TableNode $body): void {
|
||||
$this->checkTheFields($user, $body);
|
||||
}
|
||||
@@ -1734,7 +1696,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the fields of the last response to user :user and space :space should include
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $space
|
||||
@@ -1743,6 +1704,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the fields of the last response to user :user and space :space should include')]
|
||||
public function checkFieldsOfSpaceSharingResponse(string $user, string $space, ?TableNode $body): void {
|
||||
$this->verifyTableNodeColumnsCount($body, 2);
|
||||
|
||||
@@ -1798,7 +1760,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the fields of the last response (?:to|about) user "([^"]*)" sharing with (?:user|group) "([^"]*)" should include$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $sharee
|
||||
@@ -1807,6 +1768,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the fields of the last response (?:to|about) user "([^"]*)" sharing with (?:user|group) "([^"]*)" should include$/')]
|
||||
public function checkFieldsOfLastResponseToUser(string $sharer, string $sharee, ?TableNode $body): void {
|
||||
$this->checkTheFieldsOfLastResponseToUser($sharer, $sharee, $body);
|
||||
}
|
||||
@@ -1875,13 +1837,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the fields of the last response should not include
|
||||
*
|
||||
* @param TableNode|null $body
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the fields of the last response should not include')]
|
||||
public function checkFieldsNotInResponse(?TableNode $body): void {
|
||||
$this->verifyTableNodeColumnsCount($body, 2);
|
||||
$bodyRows = $body->getRowsHash();
|
||||
@@ -1925,7 +1887,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as user "([^"]*)" the public shares of (?:file|folder) "([^"]*)" should be$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -1934,6 +1895,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^as user "([^"]*)" the public shares of (?:file|folder) "([^"]*)" should be$/')]
|
||||
public function checkPublicShares(string $user, string $path, ?TableNode $TableNode): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
$response = $this->getShares($user, $path);
|
||||
@@ -1975,7 +1937,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as user "([^"]*)" the (?:file|folder) "([^"]*)" should not have any shares$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -1983,6 +1944,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^as user "([^"]*)" the (?:file|folder) "([^"]*)" should not have any shares$/')]
|
||||
public function checkPublicSharesAreEmpty(string $user, string $path): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
$response = $this->getShares($user, $path);
|
||||
@@ -2037,7 +1999,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" deletes public link share named "([^"]*)" in (?:file|folder) "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $name
|
||||
@@ -2045,6 +2006,7 @@ trait Sharing {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^user "([^"]*)" deletes public link share named "([^"]*)" in (?:file|folder) "([^"]*)" using the sharing API$/')]
|
||||
public function userDeletesPublicLinkShareNamedUsingTheSharingApi(
|
||||
string $user,
|
||||
string $name,
|
||||
@@ -2124,7 +2086,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" (declines|accepts) share "([^"]*)" offered by user "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $action
|
||||
@@ -2135,6 +2096,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" (declines|accepts) share "([^"]*)" offered by user "([^"]*)" using the sharing API$/')]
|
||||
public function userReactsToShareOfferedBy(
|
||||
string $user,
|
||||
string $action,
|
||||
@@ -2153,7 +2115,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" (declines|accepts) the already (?:accepted|declined) share "([^"]*)" offered by user "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $action
|
||||
@@ -2164,6 +2125,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" (declines|accepts) the already (?:accepted|declined) share "([^"]*)" offered by user "([^"]*)" using the sharing API$/')]
|
||||
public function userAcceptsTheAlreadyAcceptedShareOfferedByUsingTheSharingApi(
|
||||
string $user,
|
||||
string $action,
|
||||
@@ -2182,7 +2144,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" (declines|accepts) the following shares offered by user "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $action
|
||||
@@ -2192,6 +2153,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" (declines|accepts) the following shares offered by user "([^"]*)" using the sharing API$/')]
|
||||
public function userReactsToTheFollowingSharesOfferedBy(
|
||||
string $user,
|
||||
string $action,
|
||||
@@ -2215,7 +2177,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" (declines|accepts) share with ID "([^"]*)" using the sharing API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $action
|
||||
@@ -2224,6 +2185,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" (declines|accepts) share with ID "([^"]*)" using the sharing API$/')]
|
||||
public function userReactsToShareWithShareIDOfferedBy(string $user, string $action, string $share_id): void {
|
||||
$user = $this->getActualUsername($user);
|
||||
|
||||
@@ -2247,7 +2209,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has (declined|accepted) share "([^"]*)" offered by user "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $action
|
||||
@@ -2257,6 +2218,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has (declined|accepted) share "([^"]*)" offered by user "([^"]*)"$/')]
|
||||
public function userHasReactedToShareOfferedBy(
|
||||
string $user,
|
||||
string $action,
|
||||
@@ -2284,7 +2246,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should be able to (decline|accept) pending share "([^"]*)" offered by user "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $action
|
||||
@@ -2294,6 +2255,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^user "([^"]*)" should be able to (decline|accept) pending share "([^"]*)" offered by user "([^"]*)"$/')]
|
||||
public function userShouldBeAbleToAcceptShareOfferedBy(
|
||||
string $user,
|
||||
string $action,
|
||||
@@ -2321,7 +2283,6 @@ trait Sharing {
|
||||
|
||||
/**
|
||||
*
|
||||
* @Then /^the sharing API should report to user "([^"]*)" that these shares are in the (pending|accepted|declined) state$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $state
|
||||
@@ -2331,6 +2292,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the sharing API should report to user "([^"]*)" that these shares are in the (pending|accepted|declined) state$/')]
|
||||
public function assertSharesOfUserAreInState(string $user, string $state, TableNode $table): void {
|
||||
$this->verifyTableNodeColumns($table, ["path"], $this->shareResponseFields);
|
||||
$usersShares = $this->getAllSharesSharedWithUser($user, $state);
|
||||
@@ -2359,7 +2321,6 @@ trait Sharing {
|
||||
|
||||
/**
|
||||
*
|
||||
* @Then /^the sharing API should report to user "([^"]*)" that no shares are in the (pending|accepted|declined) state$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $state
|
||||
@@ -2367,6 +2328,7 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the sharing API should report to user "([^"]*)" that no shares are in the (pending|accepted|declined) state$/')]
|
||||
public function assertNoSharesOfUserAreInState(string $user, string $state): void {
|
||||
$usersShares = $this->getAllSharesSharedWithUser($user, $state);
|
||||
Assert::assertEmpty(
|
||||
@@ -2407,7 +2369,6 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" unshares (?:folder|file|entity) "([^"]*)" shared to "([^"]*)"$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $path
|
||||
@@ -2416,19 +2377,20 @@ trait Sharing {
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('/^user "([^"]*)" unshares (?:folder|file|entity) "([^"]*)" shared to "([^"]*)"$/')]
|
||||
public function userUnsharesResourceSharedTo(string $sharer, string $path, string $sharee): void {
|
||||
$response = $this->unshareResourceSharedTo($sharer, $path, $sharee);
|
||||
$this->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the sharing API should report that no shares are shared with user :user
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the sharing API should report that no shares are shared with user :user')]
|
||||
public function assertThatNoSharesAreSharedWithUser(string $user): void {
|
||||
$usersShares = $this->getAllSharesSharedWithUser($user);
|
||||
Assert::assertEmpty(
|
||||
@@ -2438,13 +2400,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user gets share with id :share using the sharing API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $share_id
|
||||
*
|
||||
* @return ResponseInterface|null
|
||||
*/
|
||||
#[When('user :user gets share with id :share using the sharing API')]
|
||||
public function userGetsTheLastShareWithTheShareIdUsingTheSharingApi(
|
||||
string $user,
|
||||
string $share_id
|
||||
@@ -2530,12 +2492,12 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public accesses the preview of file :path from the last shared public link using the sharing API
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public accesses the preview of file :path from the last shared public link using the sharing API')]
|
||||
public function thePublicAccessesThePreviewOfTheSharedFileUsingTheSharingApi(string $path): void {
|
||||
$token = ($this->isUsingSharingNG())
|
||||
? $this->shareNgGetLastCreatedLinkShareToken() : $this->getLastCreatedPublicShareToken();
|
||||
@@ -2545,13 +2507,13 @@ trait Sharing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public accesses the preview of the following files from the last shared public link using the sharing API
|
||||
*
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @throws Exception
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public accesses the preview of the following files from the last shared public link using the sharing API')]
|
||||
public function thePublicAccessesThePreviewOfTheFollowingSharedFileUsingTheSharingApi(
|
||||
TableNode $table
|
||||
): void {
|
||||
|
||||
@@ -29,6 +29,9 @@ use TestHelpers\GraphHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -209,7 +212,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets permissions list for (folder|file) "([^"]*)" of the space "([^"]*)" using the Graph API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileOrFolder (file|folder)
|
||||
@@ -219,6 +221,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" gets permissions list for (folder|file) "([^"]*)" of the space "([^"]*)" using the Graph API$/')]
|
||||
public function userGetsPermissionsListForResourceOfTheSpaceUsingTheGraphAPI(
|
||||
string $user,
|
||||
string $fileOrFolder,
|
||||
@@ -231,7 +234,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" lists the permissions of space "([^"]*)" using permissions endpoint of the Graph API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $space
|
||||
@@ -239,6 +241,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user lists the permissions of space :space using permissions endpoint of the Graph API')]
|
||||
public function userListsThePermissionsOfSpaceUsingTheGraphApi(string $user, string $space): void {
|
||||
$this->featureContext->setResponse(
|
||||
$this->getPermissionsList($user, 'folder', $space)
|
||||
@@ -246,7 +249,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" tries to list the permissions of space "([^"]*)" owned by "([^"]*)" using permissions endpoint of the Graph API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $space
|
||||
@@ -255,6 +257,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user tries to list the permissions of space :space owned by :spaceOwner using permissions endpoint of the Graph API')]
|
||||
public function userTriesToListThePermissionsOfSpaceUsingPermissionsEndpointOfTheGraphApi(
|
||||
string $user,
|
||||
string $space,
|
||||
@@ -439,7 +442,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has sent the following resource share invitation:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -448,6 +450,7 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has sent the following resource share invitation:')]
|
||||
public function userHasSentTheFollowingResourceShareInvitation(string $user, TableNode $table): void {
|
||||
$rows = $table->getRowsHash();
|
||||
Assert::assertArrayHasKey(
|
||||
@@ -460,7 +463,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has sent the following resource share invitation to federated user:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -469,6 +471,7 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has sent the following resource share invitation to federated user:')]
|
||||
public function userHasSentTheFollowingResourceShareInvitationToFederatedUser(
|
||||
string $user,
|
||||
TableNode $table
|
||||
@@ -484,7 +487,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has sent the following space share invitation:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -493,6 +495,7 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has sent the following space share invitation:')]
|
||||
public function userHasSentTheFollowingShareShareInvitation(string $user, TableNode $table): void {
|
||||
$rows = $table->getRowsHash();
|
||||
Assert::assertArrayNotHasKey(
|
||||
@@ -505,8 +508,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sends the following resource share invitation using the Graph API:$/
|
||||
* @When /^user "([^"]*)" tries to send the following resource share invitation using the Graph API:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -515,6 +516,8 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user sends the following resource share invitation using the Graph API:')]
|
||||
#[When('user :user tries to send the following resource share invitation using the Graph API:')]
|
||||
public function userSendsTheFollowingResourceShareInvitationUsingTheGraphApi(string $user, TableNode $table): void {
|
||||
$rows = $table->getRowsHash();
|
||||
Assert::assertArrayHasKey(
|
||||
@@ -528,7 +531,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sends the following resource share invitation to federated user using the Graph API:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -537,6 +539,7 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user sends the following resource share invitation to federated user using the Graph API:')]
|
||||
public function userSendsTheFollowingResourceShareInvitationToFederatedUserUsingTheGraphApi(
|
||||
string $user,
|
||||
TableNode $table
|
||||
@@ -553,7 +556,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sends the following space share invitation using permissions endpoint of the Graph API:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -562,6 +564,7 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user sends the following space share invitation using permissions endpoint of the Graph API:')]
|
||||
public function userSendsTheFollowingSpaceShareInvitationUsingPermissionsEndpointOfTheGraphApi(
|
||||
string $user,
|
||||
TableNode $table
|
||||
@@ -578,7 +581,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" tries to send the following space share invitation to federated user using permissions endpoint of the Graph API:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -587,6 +589,7 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user tries to send the following space share invitation to federated user using permissions endpoint of the Graph API:')]
|
||||
public function userSendsTheFollowingSpaceShareInvitationToFederatedUserUsingPermissionsEndpointOfTheGraphApi(
|
||||
string $user,
|
||||
TableNode $table
|
||||
@@ -603,13 +606,13 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has updated the last resource share with the following properties:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('user :user has updated the last resource share with the following properties:')]
|
||||
public function userHasUpdatedTheLastResourceShareWithTheFollowingProperties(string $user, TableNode $table): void {
|
||||
$permissionID = $this->featureContext->shareNgGetLastCreatedUserGroupShareID();
|
||||
$response = $this->updateResourceShare(
|
||||
@@ -621,13 +624,13 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user updates the last resource share with the following properties using the Graph API:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user updates the last resource share with the following properties using the Graph API:')]
|
||||
public function userUpdatesTheLastShareWithFollowingPropertiesUsingGraphApi($user, TableNode $table) {
|
||||
$permissionID = $this->featureContext->shareNgGetLastCreatedUserGroupShareID();
|
||||
$this->featureContext->setResponse(
|
||||
@@ -640,7 +643,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" updates the space share for (user|group) "([^"]*)" with the following using the Graph API:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $shareType
|
||||
@@ -649,6 +651,7 @@ class SharingNgContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^user "([^"]*)" updates the space share for (user|group) "([^"]*)" with the following using the Graph API:$/')]
|
||||
public function userUpdatesTheSpaceShareForUserOrGroupWithFollowingUsingGraphApi(
|
||||
string $user,
|
||||
string $shareType,
|
||||
@@ -706,7 +709,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user sends the following share invitation with file-id :fileId using the Graph API:
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileId
|
||||
@@ -716,6 +718,7 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user sends the following share invitation with file-id :fileId using the Graph API:')]
|
||||
public function userSendsTheFollowingShareInvitationWithFileIdUsingTheGraphApi(
|
||||
string $user,
|
||||
string $fileId,
|
||||
@@ -728,8 +731,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" creates the following resource link share using the Graph API:$/
|
||||
* @When /^user "([^"]*)" tries to create the following resource link share using the Graph API:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -737,13 +738,14 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user creates the following resource link share using the Graph API:')]
|
||||
#[When('user :user tries to create the following resource link share using the Graph API:')]
|
||||
public function userCreatesAPublicLinkShareWithSettings(string $user, TableNode $body): void {
|
||||
$response = $this->createLinkShare($user, $body);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" (?:tries to create|creates) the following space link share using permissions endpoint of the Graph API:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -751,6 +753,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('/^user "([^"]*)" (?:tries to create|creates) the following space link share using permissions endpoint of the Graph API:$/')]
|
||||
public function userCreatesTheFollowingSpaceLinkShareUsingPermissionsEndpointOfTheGraphApi(
|
||||
string $user,
|
||||
TableNode $body
|
||||
@@ -759,7 +762,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has created the following resource link share:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -767,6 +769,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has created the following resource link share:')]
|
||||
public function userHasCreatedTheFollowingResourceLinkShare(string $user, TableNode $body): void {
|
||||
$rows = $body->getRowsHash();
|
||||
Assert::assertArrayHasKey(
|
||||
@@ -780,7 +783,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has created the following space link share:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -788,6 +790,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has created the following space link share:')]
|
||||
public function userHasCreatedTheFollowingLinkShare(string $user, TableNode $body): void {
|
||||
$rows = $body->getRowsHash();
|
||||
Assert::assertArrayNotHasKey(
|
||||
@@ -801,7 +804,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has updated the last resource/space link share with
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -809,6 +811,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[Given('user :user has updated the last resource/space link share with')]
|
||||
public function userHasUpdatedLastPublicLinkShare(string $user, TableNode $body): void {
|
||||
$response = $this->updateLinkShare(
|
||||
$user,
|
||||
@@ -819,8 +822,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user updates the last public link share using the permissions endpoint of the Graph API:
|
||||
* @When user :user tries to update the last public link share using the permissions endpoint of the Graph API:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -828,6 +829,8 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user updates the last public link share using the permissions endpoint of the Graph API:')]
|
||||
#[When('user :user tries to update the last public link share using the permissions endpoint of the Graph API:')]
|
||||
public function userUpdatesTheLastPublicLinkShareUsingThePermissionsEndpointOfTheGraphApi(
|
||||
string $user,
|
||||
TableNode $body
|
||||
@@ -921,7 +924,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has set the following password for the last link share:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -929,6 +931,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has set the following password for the last link share:')]
|
||||
public function userHasSetTheFollowingPasswordForTheLastLinkShare(string $user, TableNode $body): void {
|
||||
$response = $this->setLinkSharePassword(
|
||||
$user,
|
||||
@@ -943,8 +946,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user sets the following password for the last link share using the Graph API:
|
||||
* @When user :user tries to set the following password for the last link share using the Graph API:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -952,6 +953,8 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user sets the following password for the last link share using the Graph API:')]
|
||||
#[When('user :user tries to set the following password for the last link share using the Graph API:')]
|
||||
public function userSetsOrUpdatesFollowingPasswordForLastLinkShareUsingTheGraphApi(
|
||||
string $user,
|
||||
TableNode $body
|
||||
@@ -1048,7 +1051,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has removed the access of (user|group) "([^"]*)" from (?:file|folder|resource) "([^"]*)" of space "([^"]*)"$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $recipientType (user|group)
|
||||
@@ -1060,6 +1062,7 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has removed the access of (user|group) "([^"]*)" from (?:file|folder|resource) "([^"]*)" of space "([^"]*)"$/')]
|
||||
public function userHasRemovedAccessOfUserOrGroupFromResourceOfSpace(
|
||||
string $sharer,
|
||||
string $recipientType,
|
||||
@@ -1072,7 +1075,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" removes the access of (user|group) "([^"]*)" from (?:file|folder|resource) "([^"]*)" of space "([^"]*)" using the Graph API$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $recipientType (user|group)
|
||||
@@ -1084,6 +1086,7 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('/^user "([^"]*)" removes the access of (user|group) "([^"]*)" from (?:file|folder|resource) "([^"]*)" of space "([^"]*)" using the Graph API$/')]
|
||||
public function userRemovesAccessOfUserOrGroupFromResourceOfSpaceUsingGraphAPI(
|
||||
string $sharer,
|
||||
string $recipientType,
|
||||
@@ -1097,7 +1100,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" removes the access of (user|group) "([^"]*)" from space "([^"]*)" using permissions endpoint of the Graph API$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $recipientType (user|group)
|
||||
@@ -1108,6 +1110,7 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('/^user "([^"]*)" removes the access of (user|group) "([^"]*)" from space "([^"]*)" using permissions endpoint of the Graph API$/')]
|
||||
public function userRemovesAccessOfUserOrGroupFromSpaceUsingPermissionsEndpointOfGraphAPI(
|
||||
string $sharer,
|
||||
string $recipientType,
|
||||
@@ -1120,7 +1123,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" has removed the last link share of (?:file|folder) "([^"]*)" from space "([^"]*)"$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $resource
|
||||
@@ -1130,6 +1132,7 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('/^user "([^"]*)" has removed the last link share of (?:file|folder) "([^"]*)" from space "([^"]*)"$/')]
|
||||
public function userHasRemovedTheLastLinkShareOfFileOrFolderFromSpace(
|
||||
string $sharer,
|
||||
string $resource,
|
||||
@@ -1140,7 +1143,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" removes the link of (?:file|folder) "([^"]*)" from space "([^"]*)" using the Graph API$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $resource
|
||||
@@ -1150,6 +1152,7 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('/^user "([^"]*)" removes the link of (?:file|folder) "([^"]*)" from space "([^"]*)" using the Graph API$/')]
|
||||
public function userRemovesSharePermissionOfAResourceInLinkShareUsingGraphAPI(
|
||||
string $sharer,
|
||||
string $resource,
|
||||
@@ -1161,8 +1164,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" removes the access of (user|group) "([^"]*)" from space "([^"]*)" using root endpoint of the Graph API$/
|
||||
* @When /^user "([^"]*)" tries to remove the access of (user|group) "([^"]*)" from space "([^"]*)" using root endpoint of the Graph API$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $recipientType (user|group)
|
||||
@@ -1173,6 +1174,8 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('/^user "([^"]*)" removes the access of (user|group) "([^"]*)" from space "([^"]*)" using root endpoint of the Graph API$/')]
|
||||
#[When('/^user "([^"]*)" tries to remove the access of (user|group) "([^"]*)" from space "([^"]*)" using root endpoint of the Graph API$/')]
|
||||
public function userRemovesAccessOfUserOrGroupFromSpaceUsingGraphAPI(
|
||||
string $sharer,
|
||||
string $recipientType,
|
||||
@@ -1185,8 +1188,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" removes own access from space "([^"]*)" using root endpoint of the Graph API$/
|
||||
* @When /^user "([^"]*)" tries to remove own access from space "([^"]*)" using root endpoint of the Graph API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $space
|
||||
@@ -1195,6 +1196,7 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user tries to remove own access from space :space using root endpoint of the Graph API')]
|
||||
public function userRemovesOwnAccessFromSpaceUsingGraphAPI(
|
||||
string $user,
|
||||
string $space
|
||||
@@ -1205,7 +1207,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has removed own access from space "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $space
|
||||
@@ -1214,6 +1215,7 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has removed own access from space :space')]
|
||||
public function userHasRemovedOwnAccessFromSpace(
|
||||
string $user,
|
||||
string $space
|
||||
@@ -1223,7 +1225,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" removes the link from space "([^"]*)" using root endpoint of the Graph API$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $space
|
||||
@@ -1232,6 +1233,7 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :sharer removes the link from space :space using root endpoint of the Graph API')]
|
||||
public function userRemovesLinkFromSpaceUsingRootEndpointOfGraphAPI(
|
||||
string $sharer,
|
||||
string $space
|
||||
@@ -1242,7 +1244,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has removed the access of (user|group) "([^"]*)" from space "([^"]*)"$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $recipientType (user|group)
|
||||
@@ -1253,6 +1254,7 @@ class SharingNgContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has removed the access of (user|group) "([^"]*)" from space "([^"]*)"$/')]
|
||||
public function userHasRemovedAccessOfUserOrGroupFromSpace(
|
||||
string $sharer,
|
||||
string $recipientType,
|
||||
@@ -1288,13 +1290,13 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has disabled sync of last shared resource
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[Given('user :user has disabled sync of last shared resource')]
|
||||
public function userHasDisabledSyncOfLastSharedResource(string $user): void {
|
||||
$shareItemId = $this->featureContext->shareNgGetLastCreatedUserGroupShareID();
|
||||
$shareSpaceId = GraphHelper::SHARES_SPACE_ID;
|
||||
@@ -1315,14 +1317,14 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user disables sync of share :share using the Graph API
|
||||
* @When user :user tries to disable sync of share :share using the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user disables sync of share :share using the Graph API')]
|
||||
#[When('user :user tries to disable sync of share :share using the Graph API')]
|
||||
public function userDisablesSyncOfShareUsingTheGraphApi(string $user): void {
|
||||
$shareItemId = $this->featureContext->shareNgGetLastCreatedUserGroupShareID();
|
||||
$shareSpaceId = GraphHelper::SHARES_SPACE_ID;
|
||||
@@ -1342,7 +1344,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user hides the shared resource :sharedResource using the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
@@ -1350,6 +1351,7 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user hides the shared resource :sharedResource using the Graph API')]
|
||||
public function userHidesTheSharedResourceUsingTheGraphApi(string $user): void {
|
||||
$shareItemId = $this->featureContext->shareNgGetLastCreatedUserGroupShareID();
|
||||
$response = $this->hideOrUnhideSharedResource($user, $shareItemId);
|
||||
@@ -1357,7 +1359,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has hidden the share :sharedResource
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
@@ -1365,6 +1366,7 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has hidden the share :sharedResource')]
|
||||
public function userHasHiddenTheShare(string $user): void {
|
||||
$shareItemId = $this->featureContext->shareNgGetLastCreatedUserGroupShareID();
|
||||
$response = $this->hideOrUnhideSharedResource($user, $shareItemId);
|
||||
@@ -1372,7 +1374,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user unhides the shared resource :sharedResource using the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
@@ -1380,6 +1381,7 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user unhides the shared resource :sharedResource using the Graph API')]
|
||||
public function userUnhidesTheSharedResourceUsingTheGraphApi(string $user): void {
|
||||
$shareItemId = $this->featureContext->shareNgGetLastCreatedUserGroupShareID();
|
||||
$response = $this->hideOrUnhideSharedResource($user, $shareItemId, false);
|
||||
@@ -1387,7 +1389,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user enables sync of share :share offered by :offeredBy from :space space using the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $share
|
||||
@@ -1397,6 +1398,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user enables sync of share :share offered by :offeredBy from :space space using the Graph API')]
|
||||
public function userEnablesSyncOfShareUsingTheGraphApi(
|
||||
string $user,
|
||||
string $share,
|
||||
@@ -1420,15 +1422,14 @@ class SharingNgContext implements Context {
|
||||
/**
|
||||
* step definition for enabling sync for items for non-existing group|user|space sharer
|
||||
*
|
||||
* @When user :user tries to enable share sync of a resource :resource using the Graph API
|
||||
* @When user :user enables share sync of a resource :resource using the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[When('user :user tries to enable share sync of a resource :resource using the Graph API')]
|
||||
#[When('user :user enables share sync of a resource :resource using the Graph API')]
|
||||
public function userTriesToEnableShareSyncOfResourceUsingTheGraphApi(string $user, string $resource): void {
|
||||
$shareSpaceId = GraphHelper::SHARES_SPACE_ID;
|
||||
$itemId = ($resource === 'nonexistent') ? WebDavHelper::generateUUIDv4() : $resource;
|
||||
@@ -1445,7 +1446,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to disable share sync of a resource :resource using the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
@@ -1453,6 +1453,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[When('user :user tries to disable share sync of a resource :resource using the Graph API')]
|
||||
public function userTriesToDisableShareSyncOfResourceUsingTheGraphApi(string $user, string $resource): void {
|
||||
$shareSpaceId = GraphHelper::SHARES_SPACE_ID;
|
||||
$shareID = ($resource === 'nonexistent') ? WebDavHelper::generateUUIDv4() : $resource;
|
||||
@@ -1528,7 +1529,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" has a share "([^"]*)" synced$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
@@ -1536,12 +1536,12 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[Then('user :user has a share :resource synced')]
|
||||
public function userHasShareSynced(string $user, string $resource): void {
|
||||
$this->waitAndCheckShareSyncStatus($user, $resource, "enabled");
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should have sync (enabled|disabled) for share "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $status
|
||||
@@ -1550,12 +1550,12 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Then('/^user "([^"]*)" should have sync (enabled|disabled) for share "([^"]*)"$/')]
|
||||
public function userShouldHaveSyncEnabledOrDisabledForShare(string $user, string $status, string $resource): void {
|
||||
$this->waitAndCheckShareSyncStatus($user, $resource, $status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should be able to send the following resource share invitation with all allowed permission roles
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -1564,6 +1564,7 @@ class SharingNgContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Then('user :user should be able to send the following resource share invitation with all allowed permission roles')]
|
||||
public function userShouldBeAbleToSendShareTheFollowingInvitationWithAllAllowedPermissionRoles(
|
||||
string $user,
|
||||
TableNode $table
|
||||
@@ -1615,7 +1616,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" (?:tries to list|lists) the permissions of space "([^"]*)" using root endpoint of the Graph API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $space
|
||||
@@ -1625,12 +1625,12 @@ class SharingNgContext implements Context {
|
||||
* @throws GuzzleException
|
||||
*
|
||||
*/
|
||||
#[When('/^user "([^"]*)" (?:tries to list|lists) the permissions of space "([^"]*)" using root endpoint of the Graph API$/')]
|
||||
public function userListsThePermissionsOfDriveUsingRootEndPointOFTheGraphApi(string $user, string $space): void {
|
||||
$this->featureContext->setResponse($this->getDrivePermissionsList($user, $space));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" (?:tries to send|sends) the following space share invitation using root endpoint of the Graph API:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -1638,6 +1638,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('/^user "([^"]*)" (?:tries to send|sends) the following space share invitation using root endpoint of the Graph API:$/')]
|
||||
public function userSendsTheFollowingShareInvitationUsingRootEndPointTheGraphApi(
|
||||
string $user,
|
||||
TableNode $table
|
||||
@@ -1647,7 +1648,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" tries to send the following space share invitation to federated user using root endpoint of the Graph API:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -1655,6 +1655,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user tries to send the following space share invitation to federated user using root endpoint of the Graph API:')]
|
||||
public function userSendsTheFollowingShareInvitationToFederatedUserUsingRootEndPointTheGraphApi(
|
||||
string $user,
|
||||
TableNode $table
|
||||
@@ -1664,7 +1665,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user updates the last drive share with the following using root endpoint of the Graph API:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -1672,6 +1672,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user updates the last drive share with the following using root endpoint of the Graph API:')]
|
||||
public function userUpdatesTheLastDriveShareWithTheFollowingUsingRootEndpointOfTheGraphApi(
|
||||
string $user,
|
||||
TableNode $table
|
||||
@@ -1705,7 +1706,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" (?:tries to create|creates) the following space link share using root endpoint of the Graph API:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -1713,6 +1713,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('/^user "([^"]*)" (?:tries to create|creates) the following space link share using root endpoint of the Graph API:$/')]
|
||||
public function userCreatesTheFollowingSpaceLinkShareUsingRootEndpointOfTheGraphApi(
|
||||
string $user,
|
||||
TableNode $body
|
||||
@@ -1729,7 +1730,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user sets the following password for the last space link share using root endpoint of the Graph API:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
@@ -1737,6 +1737,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user sets the following password for the last space link share using root endpoint of the Graph API:')]
|
||||
public function userSetsTheFollowingPasswordForTheLastSpaceLinkShareUsingRootEndpointOfTheGraphAPI(
|
||||
string $user,
|
||||
TableNode $body
|
||||
@@ -1769,7 +1770,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to remove the link from space :space owned by :owner using root endpoint of the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $space
|
||||
@@ -1778,6 +1778,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user tries to remove the link from space :space owned by :owner using root endpoint of the Graph API')]
|
||||
public function userTriesToRemoveShareLinkOfSpaceOwnedByUsingRootEndpointOfTheGraphApi(
|
||||
string $user,
|
||||
string $space,
|
||||
@@ -1798,7 +1799,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should not have any :shareType permissions on space :space
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $shareType
|
||||
@@ -1807,6 +1807,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Then('user :user should not have any :shareType permissions on space :space')]
|
||||
public function userShouldNotHaveAnyPermissionsOnSpace(string $user, string $shareType, string $space): void {
|
||||
$response = $this->getDrivePermissionsList($user, $space);
|
||||
$responseBody = $this->featureContext->getJsonDecodedResponse($response);
|
||||
@@ -1833,7 +1834,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then user :user should be able to send the following space share invitation with all allowed permission roles using root endpoint of the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -1842,6 +1842,7 @@ class SharingNgContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @codingStandardsIgnoreStart
|
||||
*/
|
||||
#[Then('user :user should be able to send the following space share invitation with all allowed permission roles using root endpoint of the Graph API')]
|
||||
public function userShouldBeAbleToSendTheFollowingSpaceShareInvitationWithAllAllowedPermissionRolesUsingRootEndpointOFTheGraphApi(
|
||||
// @codingStandardsIgnoreEnd
|
||||
string $user,
|
||||
@@ -1893,7 +1894,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to list the permissions of space :space owned by :spaceOwner using root endpoint of the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $space
|
||||
@@ -1902,6 +1902,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user tries to list the permissions of space :space owned by :spaceOwner using root endpoint of the Graph API')]
|
||||
public function userTriesToListThePermissionsOfSpaceOwnedByUsingRootEndpointOfTheGraphApi(
|
||||
string $user,
|
||||
string $space,
|
||||
@@ -1911,13 +1912,13 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user removes the last link share of space :space using permissions endpoint of the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $space
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user removes the last link share of space :space using permissions endpoint of the Graph API')]
|
||||
public function userRemovesTheLastLinkShareOfSpaceUsingPermissionsEndpointOfGraphApi(
|
||||
string $user,
|
||||
string $space
|
||||
@@ -2010,7 +2011,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" (should|should not) have a share "([^"]*)" shared by user "([^"]*)" from space "([^"]*)"$/
|
||||
*
|
||||
* @param string $sharee
|
||||
* @param string $shouldOrNot
|
||||
@@ -2020,6 +2020,7 @@ class SharingNgContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('/^user "([^"]*)" (should|should not) have a share "([^"]*)" shared by user "([^"]*)" from space "([^"]*)"$/')]
|
||||
public function userShouldHaveShareSharedByUserFromSpace(
|
||||
string $sharee,
|
||||
string $shouldOrNot,
|
||||
@@ -2031,7 +2032,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" (should|should not) have a federated share "([^"]*)" shared by user "([^"]*)" from space "([^"]*)"$/
|
||||
*
|
||||
* @param string $sharee
|
||||
* @param string $shouldOrNot
|
||||
@@ -2041,6 +2041,7 @@ class SharingNgContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('/^user "([^"]*)" (should|should not) have a federated share "([^"]*)" shared by user "([^"]*)" from space "([^"]*)"$/')]
|
||||
public function userShouldOrShouldNotHaveFederatedShareSharedByUserFromSpace(
|
||||
string $sharee,
|
||||
string $shouldOrNot,
|
||||
@@ -2052,7 +2053,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has shared the following (?:files|folders) from space "([^"]*)" with user "([^"]*)" and role "([^"]*)":$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $space
|
||||
@@ -2062,6 +2062,7 @@ class SharingNgContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has shared the following (?:files|folders) from space "([^"]*)" with user "([^"]*)" and role "([^"]*)":$/')]
|
||||
public function userHasSharedTheFollowingFilesFromSpaceWithUserAndRole(
|
||||
string $sharer,
|
||||
string $space,
|
||||
@@ -2086,12 +2087,12 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the json response should contain the following shares:
|
||||
*
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('the json response should contain the following shares:')]
|
||||
public function theJsonResponseShouldContainTheFollowingShares(TableNode $table): void {
|
||||
$responseBody = $this->featureContext->getJsonDecodedResponseBodyContent();
|
||||
|
||||
@@ -2115,7 +2116,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the allowed roles for federated user of (folder|file) "([^"]*)" from the space "([^"]*)" using the Graph API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileOrFolder (file|folder)
|
||||
@@ -2125,6 +2125,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" gets the allowed roles for federated user of (folder|file) "([^"]*)" from the space "([^"]*)" using the Graph API$/')]
|
||||
public function userGetsFederatedPermissionsListForFileOfTheSpaceUsingTheGraphApi(
|
||||
string $user,
|
||||
string $fileOrFolder,
|
||||
@@ -2140,7 +2141,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the permittion list of (folder|file) "([^"]*)" from the space "([^"]*)" using the Graph API with query "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileOrFolder (file|folder)
|
||||
@@ -2151,6 +2151,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" gets the permittion list of (folder|file) "([^"]*)" from the space "([^"]*)" using the Graph API with query "([^"]*)"$/')]
|
||||
public function userGetsPermissionsListWithQueryForFileOfTheSpaceUsingTheGraphApi(
|
||||
string $user,
|
||||
string $fileOrFolder,
|
||||
@@ -2164,7 +2165,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the drive permittion list of the space "([^"]*)" using the Graph API with query "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $space
|
||||
@@ -2173,6 +2173,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user gets the drive permittion list of the space :space using the Graph API with query :query')]
|
||||
public function userGetsDrivePermissionsListWithQueryUsingTheGraphApi(
|
||||
string $user,
|
||||
string $space,
|
||||
@@ -2182,7 +2183,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the JSON data of the response should (not |)contain the following keys:$/
|
||||
*
|
||||
* @param string|null $shouldOrNot (not| )
|
||||
* @param TableNode $table
|
||||
@@ -2190,6 +2190,7 @@ class SharingNgContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the JSON data of the response should (not |)contain the following keys:$/')]
|
||||
public function theJsonDataResponseShouldOrNotContainData(string $shouldOrNot, TableNode $table): void {
|
||||
$response = $this->featureContext->getJsonDecodedResponse($this->featureContext->getResponse());
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -14,6 +14,9 @@ use GuzzleHttp\Exception\GuzzleException;
|
||||
use PHPUnit\Framework\Assert;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -45,7 +48,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has uploaded a file from "([^"]*)" to "([^"]*)" via TUS inside of the space "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
@@ -57,6 +59,7 @@ class SpacesTUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has uploaded a file from :source to :destination via TUS inside of the space :spaceName using the WebDAV API')]
|
||||
public function userHasUploadedFileViaTusInSpace(
|
||||
string $user,
|
||||
string $source,
|
||||
@@ -69,7 +72,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" uploads a file from "([^"]*)" to "([^"]*)" via TUS inside of the space "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
@@ -80,6 +82,7 @@ class SpacesTUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user uploads a file from :source to :destination via TUS inside of the space :spaceName using the WebDAV API')]
|
||||
public function userUploadsAFileViaTusInsideOfTheSpaceUsingTheWebdavApi(
|
||||
string $user,
|
||||
string $source,
|
||||
@@ -92,7 +95,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has created a new TUS resource in the space :spaceName with the following headers:
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $spaceName
|
||||
@@ -103,6 +105,7 @@ class SpacesTUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has created a new TUS resource in the space :spaceName with the following headers:')]
|
||||
public function userHasCreatedANewTusResourceForTheSpaceUsingTheWebdavApiWithTheseHeaders(
|
||||
string $user,
|
||||
string $spaceName,
|
||||
@@ -114,7 +117,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user creates a new TUS resource for the space :spaceName with content :content using the WebDAV API with these headers:
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $spaceName
|
||||
@@ -126,6 +128,7 @@ class SpacesTUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user creates a new TUS resource for the space :spaceName with content :content using the WebDAV API with these headers:')]
|
||||
public function userCreatesANewTusResourceForTheSpaceUsingTheWebdavApiWithTheseHeaders(
|
||||
string $user,
|
||||
string $spaceName,
|
||||
@@ -166,7 +169,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" uploads a file with content "([^"]*)" to "([^"]*)" inside federated share "([^"]*)" via TUS using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $content
|
||||
@@ -176,6 +178,7 @@ class SpacesTUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[When('user :user uploads a file with content :content to :file inside federated share :destination via TUS using the WebDAV API')]
|
||||
public function userUploadsAFileWithContentToInsideFederatedShareViaTusUsingTheWebdavApi(
|
||||
string $user,
|
||||
string $content,
|
||||
@@ -196,7 +199,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" uploads a file with content "([^"]*)" to "([^"]*)" via TUS inside of the space "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $content
|
||||
@@ -206,6 +208,7 @@ class SpacesTUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[When('user :user uploads a file with content :content to :resource via TUS inside of the space :spaceName using the WebDAV API')]
|
||||
public function userUploadsAFileWithContentToViaTusInsideOfTheSpaceUsingTheWebdavApi(
|
||||
string $user,
|
||||
string $content,
|
||||
@@ -216,7 +219,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has uploaded a file with content "([^"]*)" to "([^"]*)" via TUS inside of the space "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $content
|
||||
@@ -226,6 +228,7 @@ class SpacesTUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[Given('user :user has uploaded a file with content :content to :resource via TUS inside of the space :spaceName')]
|
||||
public function userHasUploadedAFileWithContentToViaTusInsideOfTheSpace(
|
||||
string $user,
|
||||
string $content,
|
||||
@@ -236,7 +239,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" uploads a file "([^"]*)" to "([^"]*)" with mtime "([^"]*)" via TUS inside of the space "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
@@ -249,6 +251,7 @@ class SpacesTUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user uploads a file :source to :destination with mtime :mtime via TUS inside of the space :spaceName using the WebDAV API')]
|
||||
public function userUploadsAFileToWithMtimeViaTusInsideOfTheSpaceUsingTheWebdavApi(
|
||||
string $user,
|
||||
string $source,
|
||||
@@ -289,7 +292,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has uploaded file with checksum "([^"]*)" to the last created TUS Location with offset "([^"]*)" and content "([^"]*)" via TUS inside of the space "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $checksum
|
||||
@@ -301,6 +303,7 @@ class SpacesTUSContext implements Context {
|
||||
* @throws Exception|GuzzleException
|
||||
* @codingStandardsIgnoreStart
|
||||
*/
|
||||
#[Given('user :user has uploaded file with checksum :checksum to the last created TUS Location with offset :offset and content :content via TUS inside of the space :spaceName using the WebDAV API')]
|
||||
public function userHasUploadedFileWithChecksumToTheLastCreatedTusLocationWithOffsetAndContentViaTusInsideOfTheSpaceUsingTheWebdavApi(
|
||||
// @codingStandardsIgnoreEnd
|
||||
string $user,
|
||||
@@ -315,7 +318,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" uploads file with checksum "([^"]*)" to the last created TUS Location with offset "([^"]*)" and content "([^"]*)" via TUS inside of the space "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $checksum
|
||||
@@ -327,6 +329,7 @@ class SpacesTUSContext implements Context {
|
||||
* @throws Exception|GuzzleException
|
||||
* @codingStandardsIgnoreStart
|
||||
*/
|
||||
#[When('user :user uploads file with checksum :checksum to the last created TUS Location with offset :offset and content :content via TUS inside of the space :spaceName using the WebDAV API')]
|
||||
public function userUploadsFileWithChecksumToTheLastCreatedTusLocationWithOffsetAndContentViaTusInsideOfTheSpaceUsingTheWebdavApi(
|
||||
// @codingStandardsIgnoreEnd
|
||||
string $user,
|
||||
@@ -341,7 +344,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sends a chunk to the last created TUS Location with offset "([^"]*)" and data "([^"]*)" with checksum "([^"]*)" via TUS inside of the space "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $offset
|
||||
@@ -353,6 +355,7 @@ class SpacesTUSContext implements Context {
|
||||
* @throws Exception|GuzzleException
|
||||
* @codingStandardsIgnoreStart
|
||||
*/
|
||||
#[When('user :user sends a chunk to the last created TUS Location with offset :offset and data :data with checksum :checksum via TUS inside of the space :spaceName using the WebDAV API')]
|
||||
public function userSendsAChunkToTheLastCreatedTusLocationWithOffsetAndDataWithChecksumViaTusInsideOfTheSpaceUsingTheWebdavApi(
|
||||
// @codingStandardsIgnoreEnd
|
||||
string $user,
|
||||
@@ -367,7 +370,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sends a chunk to the last created TUS Location with data "([^"]*)" with the following headers:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $data
|
||||
@@ -376,6 +378,7 @@ class SpacesTUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[When('user :user sends a chunk to the last created TUS Location with data :data with the following headers:')]
|
||||
public function userSendsAChunkToTheLastCreatedTusLocationWithDataInsideOfTheSpaceWithHeaders(
|
||||
string $user,
|
||||
string $data,
|
||||
@@ -395,7 +398,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" overwrites recently shared file with offset "([^"]*)" and data "([^"]*)" with checksum "([^"]*)" via TUS inside of the space "([^"]*)" using the WebDAV API with these headers:$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $offset
|
||||
@@ -408,6 +410,7 @@ class SpacesTUSContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @codingStandardsIgnoreStart
|
||||
*/
|
||||
#[When('user :user overwrites recently shared file with offset :offset and data :data with checksum :checksum via TUS inside of the space :spaceName using the WebDAV API with these headers:')]
|
||||
public function userOverwritesRecentlySharedFileWithOffsetAndDataWithChecksumViaTusInsideOfTheSpaceUsingTheWebdavApiWithTheseHeaders(
|
||||
// @codingStandardsIgnoreEnd
|
||||
string $user,
|
||||
@@ -426,7 +429,6 @@ class SpacesTUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as "([^"]*)" the mtime of the file "([^"]*)" in space "([^"]*)" should be "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
@@ -436,6 +438,7 @@ class SpacesTUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
#[Then('as :user the mtime of the file :resource in space :spaceName should be :mtime')]
|
||||
public function theMtimeOfTheFileInSpaceShouldBe(
|
||||
string $user,
|
||||
string $resource,
|
||||
|
||||
@@ -33,6 +33,8 @@ use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use TestHelpers\UploadHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -130,7 +132,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user creates a new TUS resource on the WebDAV API with these headers:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $headers
|
||||
@@ -141,13 +142,13 @@ class TUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user creates a new TUS resource on the WebDAV API with these headers:')]
|
||||
public function userCreateNewTUSResourceWithHeaders(string $user, TableNode $headers, string $content = ''): void {
|
||||
$response = $this->createNewTUSResourceWithHeaders($user, $headers, $content);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has created a new TUS resource on the WebDAV API with these headers:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $headers Tus-Resumable: 1.0.0 header is added automatically
|
||||
@@ -157,6 +158,7 @@ class TUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has created a new TUS resource on the WebDAV API with these headers:')]
|
||||
public function userHasCreatedNewTUSResourceWithHeaders(string $user, TableNode $headers): void {
|
||||
$response = $this->createNewTUSResource($user, $headers);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(201, "", $response);
|
||||
@@ -218,7 +220,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user sends a chunk to the last created TUS Location with offset :offset and data :data with retry on offset mismatch using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $offset
|
||||
@@ -229,6 +230,7 @@ class TUSContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('user :user sends a chunk to the last created TUS Location with offset :offset and data :data with retry on offset mismatch using the WebDAV API')]
|
||||
public function userSendsAChunkToTUSLocationWithOffsetAndDataWithRetryOnOffsetMismatch(
|
||||
string $user,
|
||||
string $offset,
|
||||
@@ -256,7 +258,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user sends a chunk to the last created TUS Location with offset :offset and data :data using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $offset
|
||||
@@ -267,6 +268,7 @@ class TUSContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[When('user :user sends a chunk to the last created TUS Location with offset :offset and data :data using the WebDAV API')]
|
||||
public function userSendsAChunkToTUSLocationWithOffsetAndData(string $user, string $offset, string $data): void {
|
||||
$resourceLocation = $this->getLastTusResourceLocation();
|
||||
$response = $this->uploadChunkToTUSLocation($user, $resourceLocation, $offset, $data);
|
||||
@@ -274,7 +276,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user uploads file :source to :destination using the TUS protocol on the WebDAV API
|
||||
*
|
||||
* @param string|null $user
|
||||
* @param string $source
|
||||
@@ -294,6 +295,7 @@ class TUSContext implements Context {
|
||||
* @throws ReflectionException
|
||||
* @throws TusException
|
||||
*/
|
||||
#[When('user :user uploads file :source to :destination using the TUS protocol on the WebDAV API')]
|
||||
public function userUploadsUsingTusAFileTo(
|
||||
?string $user,
|
||||
string $source,
|
||||
@@ -384,7 +386,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user uploads file with content :content to :destination using the TUS protocol on the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $content
|
||||
@@ -394,6 +395,7 @@ class TUSContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user uploads file with content :content to :destination using the TUS protocol on the WebDAV API')]
|
||||
public function userUploadsAFileWithContentToUsingTus(
|
||||
string $user,
|
||||
string $content,
|
||||
@@ -414,7 +416,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user uploads file with content :content in :noOfChunks chunks to :destination using the TUS protocol on the WebDAV API
|
||||
*
|
||||
* @param string|null $user
|
||||
* @param string $content
|
||||
@@ -430,6 +431,7 @@ class TUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user uploads file with content :content in :noOfChunks chunks to :destination using the TUS protocol on the WebDAV API')]
|
||||
public function userUploadsAFileWithContentInChunksUsingTus(
|
||||
?string $user,
|
||||
string $content,
|
||||
@@ -450,7 +452,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has uploaded file :source to :destination with mtime :mtime using the TUS protocol
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
@@ -461,6 +462,7 @@ class TUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has uploaded file :source to :destination with mtime :mtime using the TUS protocol')]
|
||||
public function userHasUploadedFileWithMtimeUsingTUS(
|
||||
string $user,
|
||||
string $source,
|
||||
@@ -481,7 +483,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user uploads file :source to :destination with mtime :mtime using the TUS protocol on the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
@@ -492,6 +493,7 @@ class TUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user uploads file :source to :destination with mtime :mtime using the TUS protocol on the WebDAV API')]
|
||||
public function userUploadsFileWithContentToWithMtimeUsingTUS(
|
||||
string $user,
|
||||
string $source,
|
||||
@@ -551,7 +553,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user creates a new TUS resource with content :content on the WebDAV API with these headers:
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $content
|
||||
@@ -561,6 +562,7 @@ class TUSContext implements Context {
|
||||
* @throws Exception
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user creates a new TUS resource with content :content on the WebDAV API with these headers:')]
|
||||
public function userCreatesWithUpload(
|
||||
string $user,
|
||||
string $content,
|
||||
@@ -571,7 +573,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user creates file :source and uploads content :content in the same request using the TUS protocol on the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
@@ -580,6 +581,7 @@ class TUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user creates file :source and uploads content :content in the same request using the TUS protocol on the WebDAV API')]
|
||||
public function userUploadsWithCreatesWithUpload(
|
||||
string $user,
|
||||
string $source,
|
||||
@@ -600,7 +602,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user uploads file with checksum :checksum to the last created TUS Location with offset :offset and content :content using the TUS protocol on the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $checksum
|
||||
@@ -610,6 +611,7 @@ class TUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user uploads file with checksum :checksum to the last created TUS Location with offset :offset and content :content using the TUS protocol on the WebDAV API')]
|
||||
public function userUploadsFileWithChecksum(
|
||||
string $user,
|
||||
string $checksum,
|
||||
@@ -622,8 +624,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user uploads content :content with checksum :checksum and offset :offset to the index :locationIndex location of file :filename using the TUS protocol
|
||||
* @When user :user tries to upload content :content with checksum :checksum and offset :offset to the index :locationIndex location of file :filename using the TUS protocol
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $content
|
||||
@@ -635,6 +635,8 @@ class TUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user uploads content :content with checksum :checksum and offset :offset to the index :locationIndex location of file :filename using the TUS protocol')]
|
||||
#[When('user :user tries to upload content :content with checksum :checksum and offset :offset to the index :locationIndex location of file :filename using the TUS protocol')]
|
||||
public function userUploadsContentWithChecksumAndOffsetToIndexLocationUsingTUSProtocol(
|
||||
string $user,
|
||||
string $content,
|
||||
@@ -650,7 +652,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has uploaded file with checksum :checksum to the last created TUS Location with offset :offset and content :content using the TUS protocol on the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $checksum
|
||||
@@ -660,6 +661,7 @@ class TUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has uploaded file with checksum :checksum to the last created TUS Location with offset :offset and content :content using the TUS protocol on the WebDAV API')]
|
||||
public function userHasUploadedFileWithChecksum(
|
||||
string $user,
|
||||
string $checksum,
|
||||
@@ -672,7 +674,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user sends a chunk to the last created TUS Location with offset :offset and data :data with checksum :checksum using the TUS protocol on the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $offset
|
||||
@@ -682,6 +683,7 @@ class TUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user sends a chunk to the last created TUS Location with offset :offset and data :data with checksum :checksum using the TUS protocol on the WebDAV API')]
|
||||
public function userUploadsChunkFileWithChecksum(
|
||||
string $user,
|
||||
string $offset,
|
||||
@@ -694,7 +696,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has uploaded a chunk to the last created TUS Location with offset :offset and data :data with checksum :checksum using the TUS protocol on the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $offset
|
||||
@@ -704,6 +705,7 @@ class TUSContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has uploaded a chunk to the last created TUS Location with offset :offset and data :data with checksum :checksum using the TUS protocol on the WebDAV API')]
|
||||
public function userHasUploadedChunkFileWithChecksum(
|
||||
string $user,
|
||||
string $offset,
|
||||
@@ -716,8 +718,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user overwrites recently shared file with offset :offset and data :data with checksum :checksum using the TUS protocol on the WebDAV API with these headers:
|
||||
* @When user :user overwrites existing file with offset :offset and data :data with checksum :checksum using the TUS protocol on the WebDAV API with these headers:
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $offset
|
||||
@@ -730,6 +730,8 @@ class TUSContext implements Context {
|
||||
* @throws GuzzleException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user overwrites recently shared file with offset :offset and data :data with checksum :checksum using the TUS protocol on the WebDAV API with these headers:')]
|
||||
#[When('user :user overwrites existing file with offset :offset and data :data with checksum :checksum using the TUS protocol on the WebDAV API with these headers:')]
|
||||
public function userOverwritesFileWithChecksum(
|
||||
string $user,
|
||||
string $offset,
|
||||
|
||||
@@ -26,6 +26,9 @@ use PHPUnit\Framework\Assert;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use TestHelpers\GraphHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -92,7 +95,6 @@ class TagContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" creates the following tags for (folder|file) "([^"]*)" of space "([^"]*)":$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileOrFolder (file|folder)
|
||||
@@ -103,6 +105,7 @@ class TagContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" creates the following tags for (folder|file) "([^"]*)" of space "([^"]*)":$/')]
|
||||
public function theUserCreatesFollowingTags(
|
||||
string $user,
|
||||
string $fileOrFolder,
|
||||
@@ -115,7 +118,6 @@ class TagContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has created the following tags for (folder|file)\s?"([^"]*)" of the space "([^"]*)":$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileOrFolder (file|folder)
|
||||
@@ -126,6 +128,7 @@ class TagContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has created the following tags for (folder|file)\\s?"([^"]*)" of the space "([^"]*)":$/')]
|
||||
public function theUserHasCreatedFollowingTags(
|
||||
string $user,
|
||||
string $fileOrFolder,
|
||||
@@ -138,7 +141,6 @@ class TagContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has tagged the following (folders|files) of the space "([^"]*)":$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $filesOrFolders (files|folders)
|
||||
@@ -148,6 +150,7 @@ class TagContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has tagged the following (folders|files) of the space "([^"]*)":$/')]
|
||||
public function userHasCreatedTheFollowingTagsForFilesOfTheSpace(
|
||||
string $user,
|
||||
string $filesOrFolders,
|
||||
@@ -164,13 +167,13 @@ class TagContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user lists all available tag(s) via the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user lists all available tag(s) via the Graph API')]
|
||||
public function theUserGetsAllAvailableTags(string $user): void {
|
||||
// Note: after creating or deleting tags, in some cases tags do not appear or disappear immediately,
|
||||
// So wait is necessary before listing tags
|
||||
@@ -186,7 +189,6 @@ class TagContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the response should (not|)\s?contain following tag(s):$/
|
||||
*
|
||||
* @param string $shouldOrNot (not|)
|
||||
* @param TableNode $table
|
||||
@@ -194,6 +196,7 @@ class TagContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the response should (not|)\\s?contain following tag(s):$/')]
|
||||
public function theFollowingTagsShouldExistForUser(string $shouldOrNot, TableNode $table): void {
|
||||
$rows = $table->getRows();
|
||||
foreach ($rows as $row) {
|
||||
@@ -255,7 +258,6 @@ class TagContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" removes the following tags for (folder|file) "([^"]*)" of space "([^"]*)":$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileOrFolder (file|folder)
|
||||
@@ -266,6 +268,7 @@ class TagContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" removes the following tags for (folder|file) "([^"]*)" of space "([^"]*)":$/')]
|
||||
public function userRemovesTagsFromResourceOfTheSpace(
|
||||
string $user,
|
||||
string $fileOrFolder,
|
||||
@@ -284,7 +287,6 @@ class TagContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has removed the following tags for (folder|file) "([^"]*)" of space "([^"]*)":$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileOrFolder (file|folder)
|
||||
@@ -295,6 +297,7 @@ class TagContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has removed the following tags for (folder|file) "([^"]*)" of space "([^"]*)":$/')]
|
||||
public function userHAsRemovedTheFollowingTagsForFileOfSpace(
|
||||
string $user,
|
||||
string $fileOrFolder,
|
||||
|
||||
@@ -28,6 +28,9 @@ use Psr\Http\Message\ResponseInterface;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -61,12 +64,12 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user empties the trashbin using the trashbin API
|
||||
*
|
||||
* @param string $user user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user empties the trashbin using the trashbin API')]
|
||||
public function userEmptiesTrashbin(string $user): void {
|
||||
$this->featureContext->setResponse($this->emptyTrashbin($user));
|
||||
}
|
||||
@@ -323,7 +326,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user lists the resources in the trashbin with depth :depth using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $depth
|
||||
@@ -331,18 +333,19 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user lists the resources in the trashbin with depth :depth using the WebDAV API')]
|
||||
public function userGetsFilesInTheTrashbinWithDepthUsingTheWebdavApi(string $user, string $depth): void {
|
||||
$this->listTopOfTrashbinFolder($user, $depth);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the trashbin DAV response should not contain these nodes
|
||||
*
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the trashbin DAV response should not contain these nodes')]
|
||||
public function theTrashbinDavResponseShouldNotContainTheseNodes(TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['name']);
|
||||
$files = $this->getTrashbinContentFromResponseXml(
|
||||
@@ -360,13 +363,13 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the trashbin DAV response should contain these nodes
|
||||
*
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the trashbin DAV response should contain these nodes')]
|
||||
public function theTrashbinDavResponseShouldContainTheseNodes(TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['name']);
|
||||
|
||||
@@ -428,7 +431,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :asUser tries to list the trashbin content for user :user
|
||||
*
|
||||
* @param string $asUser
|
||||
* @param string $user
|
||||
@@ -436,6 +438,7 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :asUser tries to list the trashbin content for user :user')]
|
||||
public function userTriesToListTheTrashbinContentForUser(string $asUser, string $user) {
|
||||
$user = $this->featureContext->getActualUsername($user);
|
||||
$asUser = $this->featureContext->getActualUsername($asUser);
|
||||
@@ -444,7 +447,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :asUser tries to list the trashbin content for user :user using password :password
|
||||
*
|
||||
* @param string $asUser
|
||||
* @param string $user
|
||||
@@ -453,6 +455,7 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :asUser tries to list the trashbin content for user :user using password :password')]
|
||||
public function userTriesToListTheTrashbinContentForUserUsingPassword(
|
||||
string $asUser,
|
||||
string $user,
|
||||
@@ -463,13 +466,13 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the last webdav response should not contain the following elements
|
||||
*
|
||||
* @param TableNode $elements
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the last webdav response should not contain the following elements')]
|
||||
public function theLastWebdavResponseShouldNotContainFollowingElements(TableNode $elements): void {
|
||||
$files = $this->getTrashbinContentFromResponseXml(
|
||||
HttpRequestHelper::getResponseXml($this->featureContext->getResponse())
|
||||
@@ -495,7 +498,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to delete the file with original path :path from the trashbin of user :ofUser using the trashbin API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -504,13 +506,13 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user tries to delete the file with original path :path from the trashbin of user :ofUser using the trashbin API')]
|
||||
public function userTriesToDeleteFromTrashbinOfUser(string $user, string $path, string $ofUser): void {
|
||||
$response = $this->deleteItemFromTrashbin($user, $path, $ofUser);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to delete the file with original path :path from the trashbin of user :ofUser using the password :password and the trashbin API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -521,6 +523,7 @@ class TrashbinContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user tries to delete the file with original path :path from the trashbin of user :ofUser using the password :password and the trashbin API')]
|
||||
public function userTriesToDeleteFromTrashbinOfUserUsingPassword(
|
||||
string $user,
|
||||
string $path,
|
||||
@@ -532,7 +535,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :asUser tries to restore the file with original path :path from the trashbin of user :user using the trashbin API
|
||||
*
|
||||
* @param string|null $asUser
|
||||
* @param string|null $path
|
||||
@@ -542,6 +544,7 @@ class TrashbinContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :asUser tries to restore the file with original path :path from the trashbin of user :user using the trashbin API')]
|
||||
public function userTriesToRestoreFromTrashbinOfUser(?string $asUser, ?string $path, ?string $user): void {
|
||||
$user = $this->featureContext->getActualUsername($user);
|
||||
$asUser = $this->featureContext->getActualUsername($asUser);
|
||||
@@ -550,7 +553,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :asUser tries to restore the file with original path :path from the trashbin of user :user using the password :password and the trashbin API
|
||||
*
|
||||
* @param string|null $asUser
|
||||
* @param string|null $path
|
||||
@@ -561,6 +563,7 @@ class TrashbinContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :asUser tries to restore the file with original path :path from the trashbin of user :user using the password :password and the trashbin API')]
|
||||
public function userTriesToRestoreFromTrashbinOfUserUsingPassword(
|
||||
?string $asUser,
|
||||
?string $path,
|
||||
@@ -589,22 +592,6 @@ class TrashbinContext implements Context {
|
||||
return '/' . \join('/', $decodedParts);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" tries to delete the (?:file|folder|entry) with original path "([^"]*)" from the trashbin using the trashbin API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $originalPath
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function userTriesToDeleteFileWithOriginalPathFromTrashbinUsingTrashbinAPI(
|
||||
string $user,
|
||||
string $originalPath
|
||||
): void {
|
||||
$response = $this->deleteItemFromTrashbin($user, $originalPath);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
* @param string $originalPath
|
||||
@@ -657,7 +644,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" deletes the (?:file|folder|entry) with original path "([^"]*)" from the trashbin using the trashbin API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $originalPath
|
||||
@@ -665,6 +651,7 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" deletes the (?:file|folder|entry) with original path "([^"]*)" from the trashbin using the trashbin API$/')]
|
||||
public function deleteFileFromTrashbin(string $user, string $originalPath): void {
|
||||
$response = $this->deleteItemFromTrashbin($user, $originalPath);
|
||||
$this->featureContext->setResponse($response);
|
||||
@@ -672,7 +659,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has deleted the (?:file|folder|entry) with original path "([^"]*)" from the trashbin$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $originalPath
|
||||
@@ -680,13 +666,13 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has deleted the (?:file|folder|entry) with original path "([^"]*)" from the trashbin$/')]
|
||||
public function userHasDeletedTheFolderWithOriginalPathFromTheTrashbin(string $user, string $originalPath): void {
|
||||
$response = $this->deleteItemFromTrashbin($user, $originalPath);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(204, '', $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" deletes the following (?:files|folders|entries) with original path from the trashbin$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -694,6 +680,7 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" deletes the following (?:files|folders|entries) with original path from the trashbin$/')]
|
||||
public function deleteFollowingFilesFromTrashbin(string $user, TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ["path"]);
|
||||
$paths = $table->getHash();
|
||||
@@ -706,7 +693,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as "([^"]*)" (?:file|folder|entry) "([^"]*)" should exist in the trashbin$/
|
||||
*
|
||||
* @param string|null $user
|
||||
* @param string|null $path
|
||||
@@ -715,6 +701,7 @@ class TrashbinContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^as "([^"]*)" (?:file|folder|entry) "([^"]*)" should exist in the trashbin$/')]
|
||||
public function asFileOrFolderExistsInTrash(?string $user, ?string $path): void {
|
||||
$user = $this->featureContext->getActualUsername($user);
|
||||
$path = \trim($path, '/');
|
||||
@@ -883,7 +870,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user restores the folder/file with original path :originalPath without specifying the destination using the trashbin API
|
||||
*
|
||||
* @param $user string
|
||||
* @param $originalPath string
|
||||
@@ -891,6 +877,7 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user restores the folder/file with original path :originalPath without specifying the destination using the trashbin API')]
|
||||
public function userRestoresResourceWithOriginalPathWithoutSpecifyingDestinationUsingTrashbinApi(
|
||||
string $user,
|
||||
string $originalPath
|
||||
@@ -917,7 +904,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" restores the (?:file|folder|entry) with original path "([^"]*)" using the trashbin API$/
|
||||
*
|
||||
* @param string|null $user
|
||||
* @param string $originalPath
|
||||
@@ -926,13 +912,13 @@ class TrashbinContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" restores the (?:file|folder|entry) with original path "([^"]*)" using the trashbin API$/')]
|
||||
public function elementInTrashIsRestored(?string $user, string $originalPath): void {
|
||||
$user = $this->featureContext->getActualUsername($user);
|
||||
$this->featureContext->setResponse($this->restoreElement($user, $originalPath));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" restores the following (?:files|folders|entries) with original path$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -940,6 +926,7 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" restores the following (?:files|folders|entries) with original path$/')]
|
||||
public function userRestoresFollowingFiles(string $user, TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ["path"]);
|
||||
$paths = $table->getHash();
|
||||
@@ -952,7 +939,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has restored the (?:file|folder|entry) with original path "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $originalPath
|
||||
@@ -960,6 +946,7 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has restored the (?:file|folder|entry) with original path "([^"]*)"$/')]
|
||||
public function elementInTrashHasBeenRestored(string $user, string $originalPath): void {
|
||||
$response = $this->restoreElement($user, $originalPath);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(201, "", $response);
|
||||
@@ -969,7 +956,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" restores the (?:file|folder|entry) with original path "([^"]*)" to "([^"]*)" using the trashbin API$/
|
||||
*
|
||||
* @param string|null $user
|
||||
* @param string|null $originalPath
|
||||
@@ -979,6 +965,7 @@ class TrashbinContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" restores the (?:file|folder|entry) with original path "([^"]*)" to "([^"]*)" using the trashbin API$/')]
|
||||
public function userRestoresTheFileWithOriginalPathToUsingTheTrashbinApi(
|
||||
?string $user,
|
||||
?string $originalPath,
|
||||
@@ -989,7 +976,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as "([^"]*)" the (?:file|folder|entry) with original path "([^"]*)" should exist in the trashbin$/
|
||||
*
|
||||
* @param string|null $user
|
||||
* @param string|null $originalPath
|
||||
@@ -998,6 +984,7 @@ class TrashbinContext implements Context {
|
||||
* @throws JsonException
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^as "([^"]*)" the (?:file|folder|entry) with original path "([^"]*)" should exist in the trashbin$/')]
|
||||
public function elementIsInTrashCheckingOriginalPath(
|
||||
?string $user,
|
||||
?string $originalPath
|
||||
@@ -1010,7 +997,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as "([^"]*)" the (?:file|folder|entry) with original path "([^"]*)" should not exist in the trashbin/
|
||||
*
|
||||
* @param string|null $user
|
||||
* @param string $originalPath
|
||||
@@ -1018,6 +1004,7 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^as "([^"]*)" the (?:file|folder|entry) with original path "([^"]*)" should not exist in the trashbin/')]
|
||||
public function elementIsNotInTrashCheckingOriginalPath(
|
||||
?string $user,
|
||||
string $originalPath
|
||||
@@ -1030,7 +1017,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as "([^"]*)" the (?:files|folders|entries) with following original paths should not exist in the trashbin$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -1038,6 +1024,7 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^as "([^"]*)" the (?:files|folders|entries) with following original paths should not exist in the trashbin$/')]
|
||||
public function followingElementsAreNotInTrashCheckingOriginalPath(
|
||||
string $user,
|
||||
TableNode $table
|
||||
@@ -1055,7 +1042,6 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as "([^"]*)" the (?:files|folders|entries) with following original paths should exist in the trashbin$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $table
|
||||
@@ -1063,6 +1049,7 @@ class TrashbinContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^as "([^"]*)" the (?:files|folders|entries) with following original paths should exist in the trashbin$/')]
|
||||
public function followingElementsAreInTrashCheckingOriginalPath(
|
||||
string $user,
|
||||
TableNode $table
|
||||
@@ -1118,12 +1105,12 @@ class TrashbinContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the deleted (?:file|folder) "([^"]*)" should have the correct deletion mtime in the response$/
|
||||
*
|
||||
* @param string $resource file or folder in trashbin
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('/^the deleted (?:file|folder) "([^"]*)" should have the correct deletion mtime in the response$/')]
|
||||
public function theDeletedFileFolderShouldHaveCorrectDeletionMtimeInTheResponse(string $resource): void {
|
||||
$files = $this->getTrashbinContentFromResponseXml(
|
||||
HttpRequestHelper::getResponseXml($this->featureContext->getResponse())
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -28,6 +28,9 @@ use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\OcHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -134,7 +137,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user locks file :file using the WebDAV API setting the following properties
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -142,6 +144,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user locks file :file using the WebDAV API setting the following properties')]
|
||||
public function userLocksFileSettingPropertiesUsingWebDavAPI(string $user, string $file, TableNode $properties) {
|
||||
$spaceId = null;
|
||||
if (\str_starts_with($file, "Shares/")
|
||||
@@ -155,7 +158,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to lock file/folder :file using the WebDAV API setting the following properties
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -163,6 +165,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user tries to lock file/folder :file using the WebDAV API setting the following properties')]
|
||||
public function userTriesToLockFileSettingPropertiesUsingWebDavAPI(
|
||||
string $user,
|
||||
string $file,
|
||||
@@ -173,7 +176,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user locks file :file inside the space :space using the WebDAV API setting the following properties
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -183,6 +185,7 @@ class WebDavLockingContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[When('user :user locks file :file inside the space :space using the WebDAV API setting the following properties')]
|
||||
public function userLocksFileInProjectSpaceUsingWebDavAPI(
|
||||
string $user,
|
||||
string $file,
|
||||
@@ -222,7 +225,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has locked file :file inside the space :space setting the following properties
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -232,6 +234,7 @@ class WebDavLockingContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Given('user :user has locked file :file inside the space :space setting the following properties')]
|
||||
public function userHasLockedFileInProjectSpaceUsingWebDavAPI(
|
||||
string $user,
|
||||
string $file,
|
||||
@@ -243,7 +246,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to lock file :file inside the space :space using the WebDAV API setting the following properties
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -252,6 +254,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user tries to lock file :file inside the space :space using the WebDAV API setting the following properties')]
|
||||
public function userTriesToLockFileInProjectSpaceUsingWebDavAPI(
|
||||
string $user,
|
||||
string $file,
|
||||
@@ -272,7 +275,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user locks file :file using file-id :fileId using the WebDAV API setting the following properties
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -281,6 +283,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user locks file :file using file-id :fileId using the WebDAV API setting the following properties')]
|
||||
public function userLocksFileUsingFileIdUsingWebDavAPISettingFollowingProperties(
|
||||
string $user,
|
||||
string $file,
|
||||
@@ -295,7 +298,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to lock file :file using file-id :fileId using the WebDAV API setting the following properties
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -304,6 +306,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user tries to lock file :file using file-id :fileId using the WebDAV API setting the following properties')]
|
||||
public function userTriesToLockFileUsingFileIdUsingWebDavAPI(
|
||||
string $user,
|
||||
string $file,
|
||||
@@ -318,7 +321,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has locked file :file setting the following properties
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -326,13 +328,13 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('user :user has locked file :file setting the following properties')]
|
||||
public function userHasLockedFile(string $user, string $file, TableNode $properties) {
|
||||
$response = $this->lockFile($user, $file, $properties);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has locked file :file inside space :spaceName setting the following properties
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -341,6 +343,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('user :user has locked file :file inside space :spaceName setting the following properties')]
|
||||
public function userHasLockedFileInsideSpaceSettingTheFollowingProperties(
|
||||
string $user,
|
||||
string $file,
|
||||
@@ -353,7 +356,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has locked file :file using file-id :fileId setting the following properties
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
@@ -362,6 +364,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('user :user has locked file :file using file-id :fileId setting the following properties')]
|
||||
public function userHasLockedFileUsingFileId(string $user, string $file, string $fileId, TableNode $properties) {
|
||||
$davPath = WebdavHelper::getDavPath($this->featureContext->getDavPathVersion());
|
||||
$davPath = \rtrim($davPath, '/');
|
||||
@@ -371,31 +374,13 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the public has locked the last public link shared file/folder setting the following properties
|
||||
*
|
||||
* @param TableNode $properties
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function publicHasLockedLastSharedFile(TableNode $properties) {
|
||||
$response = $this->lockFile(
|
||||
$this->featureContext->getLastCreatedPublicShareToken(),
|
||||
"/",
|
||||
$properties,
|
||||
null,
|
||||
true
|
||||
);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public locks the last public link shared file using the WebDAV API setting the following properties
|
||||
* @When the public tries to lock the last public link shared file using the WebDAV API setting the following properties
|
||||
*
|
||||
* @param TableNode $properties
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public locks the last public link shared file using the WebDAV API setting the following properties')]
|
||||
#[When('the public tries to lock the last public link shared file using the WebDAV API setting the following properties')]
|
||||
public function publicLocksLastSharedFile(TableNode $properties) {
|
||||
$token = ($this->featureContext->isUsingSharingNG())
|
||||
? $this->featureContext->shareNgGetLastCreatedLinkShareToken()
|
||||
@@ -412,13 +397,13 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the public has locked :file in the last public link shared folder setting the following properties
|
||||
*
|
||||
* @param string $file
|
||||
* @param TableNode $properties
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Given('the public has locked :file in the last public link shared folder setting the following properties')]
|
||||
public function publicHasLockedFileLastSharedFolder(
|
||||
string $file,
|
||||
TableNode $properties
|
||||
@@ -437,14 +422,14 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public locks "([^"]*)" in the last public link shared folder using the public WebDAV API setting the following properties$/
|
||||
* @When /^the public tries to lock "([^"]*)" in the last public link shared folder using the public WebDAV API setting the following properties$/
|
||||
*
|
||||
* @param string $file
|
||||
* @param TableNode $properties
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public locks :file in the last public link shared folder using the public WebDAV API setting the following properties')]
|
||||
#[When('the public tries to lock :file in the last public link shared folder using the public WebDAV API setting the following properties')]
|
||||
public function publicLocksFileLastSharedFolder(
|
||||
string $file,
|
||||
TableNode $properties
|
||||
@@ -464,13 +449,13 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user unlocks the last created lock of file :file using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user unlocks the last created lock of file :file using the WebDAV API')]
|
||||
public function unlockLastLockUsingWebDavAPI(string $user, string $file) {
|
||||
$response = $this->unlockItemWithLastLockOfUserAndItemUsingWebDavAPI(
|
||||
$user,
|
||||
@@ -482,7 +467,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user unlocks the last created lock of file :file inside space :spaceName using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $spaceName
|
||||
@@ -490,6 +474,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user unlocks the last created lock of file :file inside space :spaceName using the WebDAV API')]
|
||||
public function userUnlocksTheLastCreatedLockOfFileInsideSpaceUsingTheWebdavApi(
|
||||
string $user,
|
||||
string $spaceName,
|
||||
@@ -509,7 +494,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user unlocks the last created lock of file :itemToUnlock using file-id :fileId using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $itemToUnlock
|
||||
@@ -517,6 +501,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user unlocks the last created lock of file :itemToUnlock using file-id :fileId using the WebDAV API')]
|
||||
public function userUnlocksTheLastCreatedLockOfFileWithFileIdPathUsingTheWebdavApi(
|
||||
string $user,
|
||||
string $itemToUnlock,
|
||||
@@ -536,53 +521,6 @@ class WebDavLockingContext implements Context {
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user unlocks file :itemToUnlock with the last created lock of file :itemToUseLockOf using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $itemToUnlock
|
||||
* @param string $itemToUseLockOf
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unlockItemWithLastLockOfOtherItemUsingWebDavAPI(
|
||||
string $user,
|
||||
string $itemToUnlock,
|
||||
string $itemToUseLockOf
|
||||
) {
|
||||
$response = $this->unlockItemWithLastLockOfUserAndItemUsingWebDavAPI(
|
||||
$user,
|
||||
$itemToUnlock,
|
||||
$user,
|
||||
$itemToUseLockOf
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user unlocks file :itemToUnlock with the last created public lock of file :itemToUseLockOf using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $itemToUnlock
|
||||
* @param string $itemToUseLockOf
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unlockItemWithLastPublicLockOfOtherItemUsingWebDavAPI(
|
||||
string $user,
|
||||
string $itemToUnlock,
|
||||
string $itemToUseLockOf
|
||||
) {
|
||||
$lockOwner = $this->featureContext->getLastCreatedPublicShareToken();
|
||||
$response = $this->unlockItemWithLastLockOfUserAndItemUsingWebDavAPI(
|
||||
$user,
|
||||
$itemToUnlock,
|
||||
$lockOwner,
|
||||
$itemToUseLockOf
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $user
|
||||
@@ -625,45 +563,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has unlocked file :itemToUnlock with the last created lock of file :itemToUseLockOf of user :lockOwner using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $itemToUnlock
|
||||
* @param string $lockOwner
|
||||
* @param string $itemToUseLockOf
|
||||
* @param boolean $public
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
public function hasUnlockItemWithTheLastCreatedLock(
|
||||
string $user,
|
||||
string $itemToUnlock,
|
||||
string $lockOwner,
|
||||
string $itemToUseLockOf,
|
||||
bool $public = false
|
||||
) {
|
||||
$lockCount = $this->countLockOfResources($user, $itemToUnlock);
|
||||
|
||||
$response = $this->unlockItemWithLastLockOfUserAndItemUsingWebDavAPI(
|
||||
$user,
|
||||
$itemToUnlock,
|
||||
$lockOwner,
|
||||
$itemToUseLockOf,
|
||||
$public
|
||||
);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(204, "", $response);
|
||||
|
||||
$lockCountAfterUnlock = $this->countLockOfResources($user, $itemToUnlock);
|
||||
|
||||
Assert::assertEquals(
|
||||
$lockCount - 1,
|
||||
$lockCountAfterUnlock,
|
||||
"Expected $lockCount lock(s) for '$itemToUnlock' but found '$lockCount'"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
* @param string $itemToUnlock
|
||||
@@ -733,7 +632,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user unlocks file :itemToUnlock with the last created lock of file :itemToUseLockOf of user :lockOwner using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $itemToUnlock
|
||||
@@ -742,6 +640,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('user :user unlocks file :itemToUnlock with the last created lock of file :itemToUseLockOf of user :lockOwner using the WebDAV API')]
|
||||
public function userUnlocksItemWithLastLockOfUserAndItemUsingWebDavAPI(
|
||||
string $user,
|
||||
string $itemToUnlock,
|
||||
@@ -758,7 +657,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public unlocks file :itemToUnlock with the last created lock of file :itemToUseLockOf of user :lockOwner using the WebDAV API
|
||||
*
|
||||
* @param string $itemToUnlock
|
||||
* @param string $lockOwner
|
||||
@@ -766,6 +664,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public unlocks file :itemToUnlock with the last created lock of file :itemToUseLockOf of user :lockOwner using the WebDAV API')]
|
||||
public function unlockItemAsPublicWithLastLockOfUserAndItemUsingWebDavAPI(
|
||||
string $itemToUnlock,
|
||||
string $lockOwner,
|
||||
@@ -785,12 +684,12 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public unlocks file :itemToUnlock using the WebDAV API
|
||||
*
|
||||
* @param string $itemToUnlock
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the public unlocks file :itemToUnlock using the WebDAV API')]
|
||||
public function unlockItemAsPublicUsingWebDavAPI(string $itemToUnlock) {
|
||||
$token = ($this->featureContext->isUsingSharingNG())
|
||||
? $this->featureContext->shareNgGetLastCreatedLinkShareToken()
|
||||
@@ -806,96 +705,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" moves (?:file|folder|entry) "([^"]*)" to "([^"]*)" sending the locktoken of (?:file|folder|entry) "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileSource
|
||||
* @param string $fileDestination
|
||||
* @param string $itemToUseLockOf
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function moveItemSendingLockToken(
|
||||
string $user,
|
||||
string $fileSource,
|
||||
string $fileDestination,
|
||||
string $itemToUseLockOf
|
||||
) {
|
||||
$response = $this->moveItemSendingLockTokenOfUser(
|
||||
$user,
|
||||
$fileSource,
|
||||
$fileDestination,
|
||||
$itemToUseLockOf,
|
||||
$user
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
* @param string $fileSource
|
||||
* @param string $fileDestination
|
||||
* @param string $itemToUseLockOf
|
||||
* @param string $lockOwner
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function moveItemSendingLockTokenOfUser(
|
||||
string $user,
|
||||
string $fileSource,
|
||||
string $fileDestination,
|
||||
string $itemToUseLockOf,
|
||||
string $lockOwner
|
||||
): ResponseInterface {
|
||||
$user = $this->featureContext->getActualUsername($user);
|
||||
$lockOwner = $this->featureContext->getActualUsername($lockOwner);
|
||||
$destination = $this->featureContext->destinationHeaderValue(
|
||||
$user,
|
||||
$fileDestination
|
||||
);
|
||||
$token = $this->tokenOfLastLock[$lockOwner][$itemToUseLockOf];
|
||||
$headers = [
|
||||
"Destination" => $destination,
|
||||
"If" => "(<$token>)"
|
||||
];
|
||||
return $this->featureContext->makeDavRequest(
|
||||
$user,
|
||||
"MOVE",
|
||||
$fileSource,
|
||||
$headers
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" moves (?:file|folder|entry) "([^"]*)" to "([^"]*)" sending the locktoken of (?:file|folder|entry) "([^"]*)" of user "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileSource
|
||||
* @param string $fileDestination
|
||||
* @param string $itemToUseLockOf
|
||||
* @param string $lockOwner
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function userMovesItemSendingLockTokenOfUser(
|
||||
string $user,
|
||||
string $fileSource,
|
||||
string $fileDestination,
|
||||
string $itemToUseLockOf,
|
||||
string $lockOwner
|
||||
) {
|
||||
$response = $this->moveItemSendingLockTokenOfUser(
|
||||
$user,
|
||||
$fileSource,
|
||||
$fileDestination,
|
||||
$itemToUseLockOf,
|
||||
$lockOwner
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" uploads file with content "([^"]*)" to "([^"]*)" sending the locktoken of (?:file|folder|entry) "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $content
|
||||
@@ -904,6 +713,7 @@ class WebDavLockingContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('/^user "([^"]*)" uploads file with content "([^"]*)" to "([^"]*)" sending the locktoken of (?:file|folder|entry) "([^"]*)" using the WebDAV API$/')]
|
||||
public function userUploadsAFileWithContentTo(
|
||||
string $user,
|
||||
string $content,
|
||||
@@ -925,7 +735,6 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then :count locks should be reported for file :file of user :user by the WebDAV API
|
||||
*
|
||||
* @param int $count
|
||||
* @param string $file
|
||||
@@ -934,6 +743,7 @@ class WebDavLockingContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Then(':count locks should be reported for file :file of user :user by the WebDAV API')]
|
||||
public function numberOfLockShouldBeReported(int $count, string $file, string $user) {
|
||||
$lockCount = $this->countLockOfResources($user, $file);
|
||||
Assert::assertEquals(
|
||||
@@ -944,18 +754,17 @@ class WebDavLockingContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the user waits for :time seconds to expire the lock
|
||||
*
|
||||
* @param int $time
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[When('the user waits for :time seconds to expire the lock')]
|
||||
public function waitForCertainSecondsToExpireTheLock(int $time): void {
|
||||
\sleep($time);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then :count locks should be reported for file :file inside the space :space of user :user
|
||||
*
|
||||
* @param int $count
|
||||
* @param string $file
|
||||
@@ -965,6 +774,7 @@ class WebDavLockingContext implements Context {
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
#[Then(':count locks should be reported for file :file inside the space :space of user :user')]
|
||||
public function numberOfLockShouldBeReportedInProjectSpace(
|
||||
int $count,
|
||||
string $file,
|
||||
|
||||
@@ -27,6 +27,9 @@ use TestHelpers\Asserts\WebDav as WebDavTest;
|
||||
use TestHelpers\WebDavHelper;
|
||||
use TestHelpers\BehatHelper;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
use Behat\Step\Given;
|
||||
use Behat\Step\Then;
|
||||
use Behat\Step\When;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
|
||||
@@ -43,7 +46,6 @@ class WebDavPropertiesContext implements Context {
|
||||
private array $storedETAG = [];
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the properties of (?:file|folder|entry) "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -51,6 +53,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" gets the properties of (?:file|folder|entry) "([^"]*)" using the WebDAV API$/')]
|
||||
public function userGetsThePropertiesOfFolder(
|
||||
string $user,
|
||||
string $path
|
||||
@@ -64,7 +67,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the properties of (?:file|folder|entry) "([^"]*)" with depth (\d+) using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -73,6 +75,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" gets the properties of (?:file|folder|entry) "([^"]*)" with depth (\\d+) using the WebDAV API$/')]
|
||||
public function userGetsThePropertiesOfFolderWithDepth(
|
||||
string $user,
|
||||
string $path,
|
||||
@@ -118,7 +121,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" gets the following properties of (?:file|folder|entry) "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -127,6 +129,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" gets the following properties of (?:file|folder|entry) "([^"]*)" using the WebDAV API$/')]
|
||||
public function userGetsFollowingPropertiesOfEntryUsingWebDavApi(
|
||||
string $user,
|
||||
string $path,
|
||||
@@ -138,26 +141,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the user gets the following properties of (?:file|folder|entry) "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $path
|
||||
* @param TableNode|null $propertiesTable
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theUserGetsPropertiesOfFolder(string $path, TableNode $propertiesTable) {
|
||||
$response = $this->getPropertiesOfFolder(
|
||||
$this->featureContext->getCurrentUser(),
|
||||
$path,
|
||||
null,
|
||||
$propertiesTable
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has set the following properties to (?:file|folder|entry) "([^"]*)" using the WebDav API$/
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $path
|
||||
@@ -168,6 +151,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has set the following properties to (?:file|folder|entry) "([^"]*)" using the WebDav API$/')]
|
||||
public function userHasSetFollowingPropertiesUsingProppatch(
|
||||
string $username,
|
||||
string $path,
|
||||
@@ -189,7 +173,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user gets a custom property :propertyName of file :path
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $propertyName
|
||||
@@ -198,6 +181,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user gets a custom property :propertyName of file :path')]
|
||||
public function userGetsCustomPropertyOfFile(
|
||||
string $user,
|
||||
string $propertyName,
|
||||
@@ -221,7 +205,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user gets a custom property :propertyName with namespace :namespace of file :path
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $propertyName
|
||||
@@ -231,6 +214,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('user :user gets a custom property :propertyName with namespace :namespace of file :path')]
|
||||
public function userGetsPropertiesWithNamespaceOfFile(
|
||||
string $user,
|
||||
string $propertyName,
|
||||
@@ -282,7 +266,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the public gets the following properties of (?:file|folder|entry) "([^"]*)" in the last created public link using the WebDAV API$/
|
||||
*
|
||||
* @param string $path
|
||||
* @param TableNode $propertiesTable
|
||||
@@ -290,6 +273,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^the public gets the following properties of (?:file|folder|entry) "([^"]*)" in the last created public link using the WebDAV API$/')]
|
||||
public function thePublicGetsFollowingPropertiesOfEntryFromLastLinkShare(
|
||||
string $path,
|
||||
TableNode $propertiesTable
|
||||
@@ -330,7 +314,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" sets property "([^"]*)" of (?:file|folder|entry) "([^"]*)" to "([^"]*)"$/
|
||||
*
|
||||
* @param string $user user id who sets the property
|
||||
* @param string $propertyName name of property in Clark notation
|
||||
@@ -340,6 +323,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" sets property "([^"]*)" of (?:file|folder|entry) "([^"]*)" to "([^"]*)"$/')]
|
||||
public function userSetsPropertyOfEntryTo(
|
||||
string $user,
|
||||
string $propertyName,
|
||||
@@ -356,7 +340,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" sets property "([^"]*)" with namespace "([^"]*)" of (?:file|folder|entry) "([^"]*)" to "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user user id who sets the property
|
||||
* @param string $propertyName name of property in Clark notation
|
||||
@@ -367,6 +350,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[When('/^user "([^"]*)" sets property "([^"]*)" with namespace "([^"]*)" of (?:file|folder|entry) "([^"]*)" to "([^"]*)" using the WebDAV API$/')]
|
||||
public function userSetsPropertyWithNamespaceOfEntryTo(
|
||||
string $user,
|
||||
string $propertyName,
|
||||
@@ -385,7 +369,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has set property "([^"]*)" of (?:file|folder|entry) "([^"]*)" to "([^"]*)"$/
|
||||
*
|
||||
* @param string $user user id who sets the property
|
||||
* @param string $propertyName name of property in Clark notation
|
||||
@@ -395,6 +378,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('/^user "([^"]*)" has set property "([^"]*)" of (?:file|folder|entry) "([^"]*)" to "([^"]*)"$/')]
|
||||
public function userHasSetPropertyOfEntryTo(
|
||||
string $user,
|
||||
string $propertyName,
|
||||
@@ -411,36 +395,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has set property "([^"]*)" with namespace "([^"]*)" of (?:file|folder|entry) "([^"]*)" to "([^"]*)"$/
|
||||
*
|
||||
* @param string $user user id who sets the property
|
||||
* @param string $propertyName name of property in Clark notation
|
||||
* @param string $namespace namespace in the form of "x1='http://whatever.org/ns'"
|
||||
* @param string $path path on which to set properties to
|
||||
* @param string $propertyValue property value
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function userHasSetPropertyWithNamespaceOfEntryTo(
|
||||
string $user,
|
||||
string $propertyName,
|
||||
string $namespace,
|
||||
string $path,
|
||||
string $propertyValue
|
||||
): void {
|
||||
$response = $this->setResourceProperty(
|
||||
$user,
|
||||
$propertyName,
|
||||
$path,
|
||||
$propertyValue,
|
||||
$namespace
|
||||
);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(207, "", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the response should contain a custom "([^"]*)" property with value "(([^"\\]|\\.)*)"$/
|
||||
*
|
||||
* @param string $propertyName
|
||||
* @param string $propertyValue
|
||||
@@ -448,6 +402,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the response should contain a custom "([^"]*)" property with value "(([^"\\\\]|\\\\.)*)"$/')]
|
||||
public function theResponseShouldContainCustomPropertyWithValue(string $propertyName, string $propertyValue): void {
|
||||
$propertyValue = \str_replace('\"', '"', $propertyValue);
|
||||
$responseXmlObject = HttpRequestHelper::getResponseXml(
|
||||
@@ -471,7 +426,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the response should contain a custom "([^"]*)" property with namespace "([^"]*)" and value "([^"]*)"$/
|
||||
*
|
||||
* @param string $propertyName
|
||||
* @param string $namespaceString
|
||||
@@ -480,6 +434,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the response should contain a custom :propertyName property with namespace :namespaceString and value :propertyValue')]
|
||||
public function theResponseShouldContainACustomPropertyWithNamespaceAndValue(
|
||||
string $propertyName,
|
||||
string $namespaceString,
|
||||
@@ -513,7 +468,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the single response should contain a property :property with a child property :childProperty
|
||||
*
|
||||
* @param string $property
|
||||
* @param string $childProperty
|
||||
@@ -522,6 +476,7 @@ class WebDavPropertiesContext implements Context {
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the single response should contain a property :property with a child property :childProperty')]
|
||||
public function theSingleResponseShouldContainAPropertyWithChildProperty(
|
||||
string $property,
|
||||
string $childProperty
|
||||
@@ -536,13 +491,13 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the xml response should contain a property :key
|
||||
*
|
||||
* @param string $key
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the xml response should contain a property :key')]
|
||||
public function theResponseShouldContainProperty(string $key): void {
|
||||
$this->checkResponseContainsProperty(
|
||||
$this->featureContext->getResponse(),
|
||||
@@ -551,7 +506,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the xml response should contain a property :key with namespace :namespace
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $namespace
|
||||
@@ -559,6 +513,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the xml response should contain a property :key with namespace :namespace')]
|
||||
public function theResponseShouldContainPropertyWithNamespace(string $key, string $namespace): void {
|
||||
$this->checkResponseContainsProperty(
|
||||
$this->featureContext->getResponse(),
|
||||
@@ -568,7 +523,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the single response should contain a property :key with value :value
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $expectedValue
|
||||
@@ -576,6 +530,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the single response should contain a property :key with value :value')]
|
||||
public function theSingleResponseShouldContainAPropertyWithValue(
|
||||
string $key,
|
||||
string $expectedValue
|
||||
@@ -589,7 +544,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the single response about the file owned by :user should contain a property :key with value :value
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $key
|
||||
@@ -598,6 +552,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the single response about the file owned by :user should contain a property :key with value :value')]
|
||||
public function theSingleResponseAboutTheFileOwnedByShouldContainAPropertyWithValue(
|
||||
string $user,
|
||||
string $key,
|
||||
@@ -612,29 +567,6 @@ class WebDavPropertiesContext implements Context {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the single response should contain a property :key with value :value or with value :altValue
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $expectedValue
|
||||
* @param string $altExpectedValue
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theSingleResponseShouldContainAPropertyWithValueAndAlternative(
|
||||
string $key,
|
||||
string $expectedValue,
|
||||
string $altExpectedValue
|
||||
): void {
|
||||
$this->checkResponseContainsAPropertyWithValue(
|
||||
$this->featureContext->getResponse(),
|
||||
$key,
|
||||
$expectedValue,
|
||||
$altExpectedValue
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ResponseInterface $response
|
||||
* @param string $key
|
||||
@@ -711,7 +643,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the value of the item :xpath in the response should be :value
|
||||
*
|
||||
* @param string $xpath
|
||||
* @param string $expectedValue
|
||||
@@ -719,6 +650,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the value of the item :xpath in the response should be :value')]
|
||||
public function assertValueOfItemInResponseIs(string $xpath, string $expectedValue): void {
|
||||
$this->assertValueOfItemInResponseAboutUserIs(
|
||||
$xpath,
|
||||
@@ -728,7 +660,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then as user :user the value of the item :xpath of path :path in the response should be :value
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $xpath
|
||||
@@ -738,6 +669,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('as user :user the value of the item :xpath of path :path in the response should be :value')]
|
||||
public function valueOfItemOfPathShouldBe(string $user, string $xpath, string $path, string $expectedValue): void {
|
||||
$path = $this->featureContext->substituteInLineCodes($path, $user);
|
||||
$path = \ltrim($path, '/');
|
||||
@@ -751,7 +683,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the value of the item :xpath in the response about user :user should be :value
|
||||
*
|
||||
* @param string $xpath
|
||||
* @param string $user
|
||||
@@ -760,6 +691,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the value of the item :xpath in the response about user :user should be :value')]
|
||||
public function theValueOfTheItemInTheResponseAboutUserShouldBe(
|
||||
string $xpath,
|
||||
string $user,
|
||||
@@ -799,7 +731,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the value of the item :xpath in the response about user :user should be :value1 or :value2
|
||||
*
|
||||
* @param string $xpath
|
||||
* @param string|null $user
|
||||
@@ -809,6 +740,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the value of the item :xpath in the response about user :user should be :value1 or :value2')]
|
||||
public function assertValueOfItemInResponseAboutUserIsEitherOr(
|
||||
string $xpath,
|
||||
?string $user,
|
||||
@@ -865,7 +797,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the value of the item :xpath in the response should match :value
|
||||
*
|
||||
* @param string $xpath
|
||||
* @param string $pattern
|
||||
@@ -873,6 +804,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the value of the item :xpath in the response should match :value')]
|
||||
public function assertValueOfItemInResponseRegExp(string $xpath, string $pattern): void {
|
||||
$this->assertXpathValueMatchesPattern(
|
||||
HttpRequestHelper::getResponseXml($this->featureContext->getResponse()),
|
||||
@@ -882,32 +814,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as a public the lock discovery property "([^"]*)" of the (?:file|folder|entry) "([^"]*)" should match "([^"]*)"$/
|
||||
*
|
||||
* @param string $xpath
|
||||
* @param string $path
|
||||
* @param string $pattern
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function publicGetsThePropertiesOfFolderAndAssertValueOfItemInResponseRegExp(
|
||||
string $xpath,
|
||||
string $path,
|
||||
string $pattern
|
||||
): void {
|
||||
$propertiesTable = new TableNode([['propertyName'],['d:lockdiscovery']]);
|
||||
$response = $this->getPropertiesOfEntryFromLastLinkShare($path, $propertiesTable);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe('207', "", $response);
|
||||
$this->assertXpathValueMatchesPattern(
|
||||
HttpRequestHelper::getResponseXml($response, __METHOD__),
|
||||
$xpath,
|
||||
$pattern
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then there should be an entry with href containing :expectedHref in the response to user :user
|
||||
*
|
||||
* @param string $expectedHref
|
||||
* @param string $user
|
||||
@@ -915,6 +821,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('there should be an entry with href containing :expectedHref in the response to user :user')]
|
||||
public function assertEntryWithHrefMatchingRegExpInResponseToUser(string $expectedHref, string $user): void {
|
||||
$responseXmlObject = HttpRequestHelper::getResponseXml(
|
||||
$this->featureContext->getResponse(),
|
||||
@@ -1019,57 +926,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as user "([^"]*)" the lock discovery property "([^"]*)" of the (?:file|folder|entry) "([^"]*)" should match "([^"]*)"$/
|
||||
*
|
||||
* @param string|null $user
|
||||
* @param string $xpath
|
||||
* @param string $path
|
||||
* @param string $pattern
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function userGetsPropertiesOfFolderAndAssertValueOfItemInResponseToUserRegExp(
|
||||
string $user,
|
||||
string $xpath,
|
||||
string $path,
|
||||
string $pattern
|
||||
): void {
|
||||
$propertiesTable = new TableNode([['propertyName'],['d:lockdiscovery']]);
|
||||
$response = $this->getPropertiesOfFolder(
|
||||
$user,
|
||||
$path,
|
||||
null,
|
||||
$propertiesTable
|
||||
);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe('207', '', $response);
|
||||
$this->assertXpathValueMatchesPattern(
|
||||
HttpRequestHelper::getResponseXml($response, __METHOD__),
|
||||
$xpath,
|
||||
$pattern,
|
||||
$user
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the item :xpath in the response should not exist
|
||||
*
|
||||
* @param string $xpath
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function assertItemInResponseDoesNotExist(string $xpath): void {
|
||||
$xmlPart = HttpRequestHelper::getResponseXml($this->featureContext->getResponse())->xpath($xpath);
|
||||
Assert::assertFalse(
|
||||
isset($xmlPart[0]),
|
||||
"Found item with xpath \"$xpath\" but it should not exist"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as user "([^"]*)" (?:file|folder|entry) "([^"]*)" should contain a property "([^"]*)" with value "([^"]*)" or with value "([^"]*)"$/
|
||||
* @Then /^as user "([^"]*)" (?:file|folder|entry) "([^"]*)" should contain a property "([^"]*)" with value "([^"]*)"$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -1079,6 +935,8 @@ class WebDavPropertiesContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[Then('/^as user "([^"]*)" (?:file|folder|entry) "([^"]*)" should contain a property "([^"]*)" with value "([^"]*)" or with value "([^"]*)"$/')]
|
||||
#[Then('/^as user "([^"]*)" (?:file|folder|entry) "([^"]*)" should contain a property "([^"]*)" with value "([^"]*)"$/')]
|
||||
public function asUserFolderShouldContainAPropertyWithValueOrWithValue(
|
||||
string $user,
|
||||
string $path,
|
||||
@@ -1126,7 +984,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the single response should contain a property :key with value like :regex
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $regex
|
||||
@@ -1134,6 +991,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the single response should contain a property :key with value like :regex')]
|
||||
public function theSingleResponseShouldContainAPropertyWithValueLike(
|
||||
string $key,
|
||||
string $regex
|
||||
@@ -1154,13 +1012,13 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the response should contain a share-types property with
|
||||
*
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the response should contain a share-types property with')]
|
||||
public function theResponseShouldContainAShareTypesPropertyWith(TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumnsCount($table, 1);
|
||||
WebdavTest::assertResponseContainsShareTypes(
|
||||
@@ -1170,13 +1028,13 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the response should contain an empty property :property
|
||||
*
|
||||
* @param string $property
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the response should contain an empty property :property')]
|
||||
public function theResponseShouldContainAnEmptyProperty(string $property): void {
|
||||
$xmlPart = HttpRequestHelper::getResponseXml($this->featureContext->getResponse())->xpath(
|
||||
"//d:prop/$property"
|
||||
@@ -1225,23 +1083,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user stores etag of element :path using the WebDAV API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function userStoresEtagOfElement(string $user, string $path): void {
|
||||
$this->storeEtagOfElement(
|
||||
$user,
|
||||
$path
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has stored etag of element :path on path :storePath
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -1250,6 +1091,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has stored etag of element :path on path :storePath')]
|
||||
public function userStoresEtagOfElementOnPath(string $user, string $path, string $storePath): void {
|
||||
$user = $this->featureContext->getActualUsername($user);
|
||||
$this->storeEtagOfElement(
|
||||
@@ -1266,7 +1108,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has stored etag of element :path
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -1274,6 +1115,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Given('user :user has stored etag of element :path')]
|
||||
public function userHasStoredEtagOfElement(string $user, string $path): void {
|
||||
$user = $this->featureContext->getActualUsername($user);
|
||||
$this->storeEtagOfElement(
|
||||
@@ -1286,11 +1128,11 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the properties response should contain an etag$/
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('the properties response should contain an etag')]
|
||||
public function thePropertiesResponseShouldContainAnEtag(): void {
|
||||
Assert::assertTrue(
|
||||
$this->featureContext->isEtagValid($this->featureContext->getEtagFromResponseXmlObject()),
|
||||
@@ -1317,8 +1159,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then as user :username the last response should have the following properties
|
||||
*
|
||||
* only supports new DAV version
|
||||
*
|
||||
* @param string $username
|
||||
@@ -1330,6 +1170,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('as user :username the last response should have the following properties')]
|
||||
public function theResponseShouldHavePropertyWithValue(string $username, TableNode $expectedPropTable): void {
|
||||
$this->featureContext->verifyTableNodeColumns(
|
||||
$expectedPropTable,
|
||||
@@ -1403,13 +1244,13 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then these etags should not have changed:
|
||||
*
|
||||
* @param TableNode $etagTable
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('these etags should not have changed:')]
|
||||
public function theseEtagsShouldNotHaveChanged(TableNode $etagTable): void {
|
||||
$this->featureContext->verifyTableNodeColumns($etagTable, ["user", "path"]);
|
||||
$this->featureContext->verifyTableNodeColumnsCount($etagTable, 2);
|
||||
@@ -1431,13 +1272,13 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then these etags should have changed:
|
||||
*
|
||||
* @param TableNode $etagTable
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('these etags should have changed:')]
|
||||
public function theseEtagsShouldHaveChanged(TableNode $etagTable): void {
|
||||
$this->featureContext->verifyTableNodeColumns($etagTable, ["user", "path"]);
|
||||
$this->featureContext->verifyTableNodeColumnsCount($etagTable, 2);
|
||||
@@ -1459,7 +1300,6 @@ class WebDavPropertiesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the etag of element "([^"]*)" of user "([^"]*)" (should|should not) have changed$/
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $user
|
||||
@@ -1468,6 +1308,7 @@ class WebDavPropertiesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Then('/^the etag of element "([^"]*)" of user "([^"]*)" (should|should not) have changed$/')]
|
||||
public function etagOfElementOfUserShouldOrShouldNotHaveChanged(
|
||||
string $path,
|
||||
string $user,
|
||||
|
||||
@@ -108,6 +108,8 @@ default:
|
||||
- OcConfigContext:
|
||||
- TrashbinContext:
|
||||
- SharingNgContext:
|
||||
- FavoritesContext:
|
||||
- WebDavPropertiesContext:
|
||||
|
||||
apiGraphUserGroup:
|
||||
paths:
|
||||
|
||||
@@ -49,16 +49,16 @@
|
||||
|
||||
#### [Same users can be added in a group multiple time](https://github.com/owncloud/ocis/issues/5702)
|
||||
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:295](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L295)
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:294](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L294)
|
||||
|
||||
#### [Users are added in a group with wrong host in host-part of user](https://github.com/owncloud/ocis/issues/5871)
|
||||
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:379](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L379)
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:393](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L393)
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:378](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L378)
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:392](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L392)
|
||||
|
||||
#### [Adding the same user as multiple members in a single request results in listing the same user twice in the group](https://github.com/owncloud/ocis/issues/5855)
|
||||
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:430](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L430)
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:429](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L429)
|
||||
|
||||
#### [Shared file locking is not possible using different path](https://github.com/owncloud/ocis/issues/7599)
|
||||
|
||||
|
||||
@@ -49,16 +49,17 @@
|
||||
|
||||
#### [Same users can be added in a group multiple time](https://github.com/owncloud/ocis/issues/5702)
|
||||
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:295](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L295)
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:294](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L294)
|
||||
|
||||
#### [Users are added in a group with wrong host in host-part of user](https://github.com/owncloud/ocis/issues/5871)
|
||||
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:379](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L379)
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:393](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L393)
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:378](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L378)
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:392](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L392)
|
||||
|
||||
#### [Adding the same user as multiple members in a single request results in listing the same user twice in the group](https://github.com/owncloud/ocis/issues/5855)
|
||||
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:430](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L430)
|
||||
|
||||
- [apiGraphUserGroup/addUserToGroup.feature:429](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature#L429)
|
||||
|
||||
#### [Shared file locking is not possible using different path](https://github.com/owncloud/ocis/issues/7599)
|
||||
|
||||
|
||||
@@ -225,16 +225,15 @@ Feature: add users to group
|
||||
|
||||
|
||||
Scenario: add multiple users to a group at once
|
||||
Given the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
And these users have been created with default attributes:
|
||||
| username |
|
||||
| Brian |
|
||||
| Carol |
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
When the administrator "Alice" adds the following users to a group "grp1" at once using the Graph API
|
||||
Given these users have been created with default attributes:
|
||||
| username |
|
||||
| Brian |
|
||||
| Carol |
|
||||
And the administrator has created a group "grp1" using the Graph API
|
||||
When the administrator adds the following users to the following groups using the Graph API
|
||||
| username | groupname |
|
||||
| Brian | grp1 |
|
||||
| Carol | grp1 |
|
||||
Then the HTTP status code should be "204"
|
||||
And the following users should be listed in the following groups
|
||||
| username | groupname |
|
||||
|
||||
@@ -681,9 +681,8 @@ Feature: an user gets the resources shared to them
|
||||
|
||||
|
||||
Scenario: sharee lists the file share received via group invitation (Personal space)
|
||||
Given the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
Given the administrator has created a group "grp1" using the Graph API
|
||||
And user "Alice" has uploaded file with content "hello" to "textfile0.txt"
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile0.txt |
|
||||
@@ -974,9 +973,8 @@ Feature: an user gets the resources shared to them
|
||||
|
||||
Scenario: sharee lists the folder share received via group invitation (Personal space)
|
||||
Given using spaces DAV path
|
||||
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created folder "folder"
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
And the administrator has created a group "grp1" using the Graph API
|
||||
And user "Alice" has created folder "folder"
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | folder |
|
||||
@@ -1214,9 +1212,8 @@ Feature: an user gets the resources shared to them
|
||||
|
||||
|
||||
Scenario: sharee list the same file shares received via user and group invitation (Personal space)
|
||||
Given the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
Given the administrator has created a group "grp1" using the Graph API
|
||||
And user "Alice" has uploaded file with content "hello" to "textfile0.txt"
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile0.txt |
|
||||
@@ -1585,9 +1582,8 @@ Feature: an user gets the resources shared to them
|
||||
|
||||
|
||||
Scenario: sharee list the same folder shares received via user and group invitation (Personal space)
|
||||
Given the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
Given the administrator has created a group "grp1" using the Graph API
|
||||
And user "Alice" has created folder "folder"
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | folder |
|
||||
@@ -3027,10 +3023,10 @@ Feature: an user gets the resources shared to them
|
||||
|
||||
Scenario: sharee lists the file share received via group invitation (Project space)
|
||||
Given using spaces DAV path
|
||||
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
And the administrator has created a group "grp1" using the Graph API
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "new-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "new-space" with content "hello world" to "textfile0.txt"
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile0.txt |
|
||||
@@ -3242,9 +3238,9 @@ Feature: an user gets the resources shared to them
|
||||
|
||||
Scenario: sharee lists the folder share received via group invitation (Project space)
|
||||
Given using spaces DAV path
|
||||
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
And the administrator has created a group "grp1" using the Graph API
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "new-space" with the default quota using the Graph API
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
And user "Alice" has created a folder "folder" in space "new-space"
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
@@ -3435,10 +3431,10 @@ Feature: an user gets the resources shared to them
|
||||
|
||||
Scenario: sharee list the same file shares received via user and group invitation (Project space)
|
||||
Given using spaces DAV path
|
||||
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
And the administrator has created a group "grp1" using the Graph API
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "new-space" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "new-space" with content "hello world" to "textfile0.txt"
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile0.txt |
|
||||
@@ -3727,9 +3723,9 @@ Feature: an user gets the resources shared to them
|
||||
|
||||
Scenario: sharee list the same folder shares received via user and group invitation (Project space)
|
||||
Given using spaces DAV path
|
||||
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
And the administrator has created a group "grp1" using the Graph API
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "new-space" with the default quota using the Graph API
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
And user "Alice" has created a folder "folder" in space "new-space"
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
|
||||
@@ -157,8 +157,7 @@ Feature: accessing files using file id
|
||||
And user "Brian" has disabled the auto-sync share
|
||||
And user "Alice" has uploaded file with content "some data" to "/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
And the administrator has created a group "grp1" using the Graph API
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile.txt |
|
||||
@@ -180,8 +179,7 @@ Feature: accessing files using file id
|
||||
And user "Alice" has created folder "uploadFolder"
|
||||
And user "Alice" has uploaded file with content "some data" to "uploadFolder/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a group "grp1" using the Graph API
|
||||
And the administrator has created a group "grp1" using the Graph API
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | uploadFolder |
|
||||
@@ -244,13 +242,13 @@ Feature: accessing files using file id
|
||||
|
||||
Scenario Outline: user who is member of group gets content of a shared file in project space when sync is disabled
|
||||
Given using spaces DAV path
|
||||
And the administrator has created a group "grp1" using the Graph API
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "new-space" with the default quota using the Graph API
|
||||
And user "Brian" has been created with default attributes
|
||||
And user "Brian" has disabled the auto-sync share
|
||||
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Admin" has created a group "grp1" using the Graph API
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile.txt |
|
||||
@@ -275,7 +273,7 @@ Feature: accessing files using file id
|
||||
And user "Alice" has created a folder "uploadFolder" in space "new-space"
|
||||
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "uploadFolder/textfile.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Admin" has created a group "grp1" using the Graph API
|
||||
And the administrator has created a group "grp1" using the Graph API
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | uploadFolder |
|
||||
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Finds Behat step definitions (in tests/acceptance/bootstrap/*.php) that are never
|
||||
# used by any scenario in tests/acceptance/features/**/*.feature.
|
||||
#
|
||||
# Uses Behat's own RegexPatternPolicy/TurnipPatternPolicy to compile each step
|
||||
# definition pattern into the exact same regex Behat itself uses for matching,
|
||||
# so results are accurate (no custom regex re-implementation).
|
||||
#
|
||||
# This is a reporting tool, not a hard gate: some flagged steps may still be in
|
||||
# use if they are called programmatically from other PHP context code rather
|
||||
# than from a .feature file, which this script cannot detect.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
|
||||
|
||||
php -d error_reporting=E_ALL -- "${ROOT_DIR}" <<'PHP'
|
||||
<?php
|
||||
|
||||
$rootDir = $argv[1];
|
||||
require $rootDir . '/vendor-bin/behat/vendor/autoload.php';
|
||||
|
||||
use Behat\Behat\Definition\Pattern\Policy\RegexPatternPolicy;
|
||||
use Behat\Behat\Definition\Pattern\Policy\TurnipPatternPolicy;
|
||||
|
||||
$bootstrapDir = $rootDir . '/tests/acceptance/bootstrap';
|
||||
$featuresDir = $rootDir . '/tests/acceptance/features';
|
||||
|
||||
$attrRegex = "/^\s*#\[(Given|When|Then)\('(.*)'\)\]\s*$/";
|
||||
|
||||
$definitions = [];
|
||||
foreach (glob($bootstrapDir . '/*.php') as $file) {
|
||||
$lines = file($file);
|
||||
foreach ($lines as $lineNo => $line) {
|
||||
if (preg_match($attrRegex, rtrim($line, "\n"), $m)) {
|
||||
$pattern = str_replace(["\\'", '\\\\'], ["'", '\\'], $m[2]);
|
||||
$definitions[] = [
|
||||
'file' => basename($file),
|
||||
'line' => $lineNo + 1,
|
||||
'keyword' => $m[1],
|
||||
'pattern' => $pattern,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$stepLineRegex = '/^\s*(Given|When|Then|And|But)\s+(.*)$/';
|
||||
$tableRowRegex = '/^\s*\|(.*)\|\s*$/';
|
||||
|
||||
/**
|
||||
* Splits a Gherkin table row into trimmed cell values.
|
||||
*
|
||||
* @param string $row
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
function splitTableRow(string $row): array {
|
||||
return array_map('trim', explode('|', trim($row, "| \t")));
|
||||
}
|
||||
|
||||
$uniqueTexts = [];
|
||||
$featureFiles = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($featuresDir, FilesystemIterator::SKIP_DOTS)
|
||||
);
|
||||
foreach ($featureFiles as $fileInfo) {
|
||||
if ($fileInfo->getExtension() !== 'feature') {
|
||||
continue;
|
||||
}
|
||||
$lines = file($fileInfo->getPathname());
|
||||
|
||||
// pendingOutlineSteps holds raw "<placeholder>" step texts belonging to the
|
||||
// Scenario Outline currently being parsed, waiting to be substituted once
|
||||
// their Examples: table(s) are found.
|
||||
$pendingOutlineSteps = [];
|
||||
$inOutline = false;
|
||||
|
||||
$i = 0;
|
||||
$count = count($lines);
|
||||
while ($i < $count) {
|
||||
$line = rtrim($lines[$i], "\n");
|
||||
|
||||
if (preg_match('/^\s*Scenario Outline\s*:/i', $line)) {
|
||||
$inOutline = true;
|
||||
$pendingOutlineSteps = [];
|
||||
$i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (preg_match('/^\s*(Scenario\s*:|Scenario Outline\s*:|Feature\s*:)/i', $line) && !preg_match('/^\s*Scenario Outline\s*:/i', $line)) {
|
||||
// A plain Scenario (or a new Feature) ends the current outline context.
|
||||
$inOutline = false;
|
||||
$pendingOutlineSteps = [];
|
||||
}
|
||||
|
||||
if (preg_match($stepLineRegex, $line, $m)) {
|
||||
$text = rtrim($m[2]);
|
||||
if ($inOutline && strpos($text, '<') !== false) {
|
||||
$pendingOutlineSteps[] = $text;
|
||||
} else {
|
||||
$uniqueTexts[$text] = true;
|
||||
}
|
||||
$i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($inOutline && preg_match('/^\s*Examples\s*:/i', $line)) {
|
||||
$i++;
|
||||
// skip blank/tag lines before the header row
|
||||
while ($i < $count && trim($lines[$i]) === '') {
|
||||
$i++;
|
||||
}
|
||||
if ($i >= $count || !preg_match($tableRowRegex, rtrim($lines[$i], "\n"), $hm)) {
|
||||
continue;
|
||||
}
|
||||
$header = splitTableRow($hm[1]);
|
||||
$i++;
|
||||
while ($i < $count && preg_match($tableRowRegex, rtrim($lines[$i], "\n"), $rm)) {
|
||||
$row = splitTableRow($rm[1]);
|
||||
$values = count($header) === count($row) ? array_combine($header, $row) : false;
|
||||
if ($values !== false) {
|
||||
foreach ($pendingOutlineSteps as $template) {
|
||||
$substituted = preg_replace_callback(
|
||||
'/<([^>]+)>/',
|
||||
function ($mm) use ($values) {
|
||||
return $values[$mm[1]] ?? $mm[0];
|
||||
},
|
||||
$template
|
||||
);
|
||||
$uniqueTexts[$substituted] = true;
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$uniqueTexts = array_keys($uniqueTexts);
|
||||
|
||||
$regexPolicy = new RegexPatternPolicy();
|
||||
$turnipPolicy = new TurnipPatternPolicy();
|
||||
|
||||
$unused = [];
|
||||
foreach ($definitions as $def) {
|
||||
try {
|
||||
$regex = $regexPolicy->supportsPattern($def['pattern'])
|
||||
? $regexPolicy->transformPatternToRegex($def['pattern'])
|
||||
: $turnipPolicy->transformPatternToRegex($def['pattern']);
|
||||
} catch (\Throwable $e) {
|
||||
fwrite(STDERR, "Skipping invalid pattern in {$def['file']}:{$def['line']}: {$e->getMessage()}\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
$matched = false;
|
||||
foreach ($uniqueTexts as $text) {
|
||||
if (@preg_match($regex, $text) === 1) {
|
||||
$matched = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$matched) {
|
||||
$unused[] = $def;
|
||||
}
|
||||
}
|
||||
|
||||
echo "Checked " . count($definitions) . " step definitions against " . count($uniqueTexts) . " unique feature step texts.\n";
|
||||
echo "Found " . count($unused) . " potentially unused step definitions:\n\n";
|
||||
foreach ($unused as $u) {
|
||||
echo "{$u['file']}:{$u['line']} [{$u['keyword']}] {$u['pattern']}\n";
|
||||
}
|
||||
PHP
|
||||
@@ -25,6 +25,7 @@
|
||||
"pdf-viewer",
|
||||
"search",
|
||||
"admin-settings",
|
||||
"app-store"
|
||||
"app-store",
|
||||
"rclone-crypt"
|
||||
]
|
||||
}
|
||||
+2
-1
@@ -1 +1,2 @@
|
||||
_fuzz/
|
||||
_fuzz/
|
||||
.devcontainer/
|
||||
+37
-22
@@ -1,27 +1,42 @@
|
||||
run:
|
||||
deadline: 2m
|
||||
|
||||
version: "2"
|
||||
linters:
|
||||
disable-all: true
|
||||
default: none
|
||||
enable:
|
||||
- misspell
|
||||
- govet
|
||||
- staticcheck
|
||||
- errcheck
|
||||
- unparam
|
||||
- ineffassign
|
||||
- nakedret
|
||||
- gocyclo
|
||||
- dupl
|
||||
- goimports
|
||||
- revive
|
||||
- errcheck
|
||||
- gocyclo
|
||||
- gosec
|
||||
- gosimple
|
||||
- typecheck
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
- nakedret
|
||||
- revive
|
||||
- staticcheck
|
||||
- unparam
|
||||
- unused
|
||||
|
||||
linters-settings:
|
||||
gofmt:
|
||||
simplify: true
|
||||
dupl:
|
||||
threshold: 600
|
||||
settings:
|
||||
dupl:
|
||||
threshold: 600
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
formatters:
|
||||
enable:
|
||||
- goimports
|
||||
settings:
|
||||
gofmt:
|
||||
simplify: true
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
+58
-36
@@ -21,21 +21,43 @@ type Constraints struct {
|
||||
IncludePrerelease bool
|
||||
}
|
||||
|
||||
// MaxConstraintLen is the maximum allowed length of a constraint string.
|
||||
const MaxConstraintLen = 512
|
||||
|
||||
// MaxConstraintGroups is the maximum number of OR groups allowed in a
|
||||
// constraint string.
|
||||
const MaxConstraintGroups = 32
|
||||
|
||||
// ErrConstraintTooLong is returned when a constraint string exceeds the
|
||||
// maximum allowed length.
|
||||
var ErrConstraintTooLong = fmt.Errorf("constraint string is too long (max %d bytes)", MaxConstraintLen)
|
||||
|
||||
// ErrTooManyConstraintGroups is returned when a constraint string contains
|
||||
// too many OR groups.
|
||||
var ErrTooManyConstraintGroups = fmt.Errorf("too many constraint groups (max %d)", MaxConstraintGroups)
|
||||
|
||||
// NewConstraint returns a Constraints instance that a Version instance can
|
||||
// be checked against. If there is a parse error it will be returned.
|
||||
func NewConstraint(c string) (*Constraints, error) {
|
||||
|
||||
if len(c) > MaxConstraintLen {
|
||||
return nil, ErrConstraintTooLong
|
||||
}
|
||||
|
||||
// Rewrite - ranges into a comparison operation.
|
||||
c = rewriteRange(c)
|
||||
|
||||
ors := strings.Split(c, "||")
|
||||
if len(ors) > MaxConstraintGroups {
|
||||
return nil, ErrTooManyConstraintGroups
|
||||
}
|
||||
lenors := len(ors)
|
||||
or := make([][]*constraint, lenors)
|
||||
hasPre := make([]bool, lenors)
|
||||
for k, v := range ors {
|
||||
// Validate the segment
|
||||
if !validConstraintRegex.MatchString(v) {
|
||||
return nil, fmt.Errorf("improper constraint: %s", v)
|
||||
return nil, fmt.Errorf("improper constraint: %q", v)
|
||||
}
|
||||
|
||||
cs := findConstraintRegex.FindAllString(v, -1)
|
||||
@@ -104,9 +126,9 @@ func (cs Constraints) Validate(v *Version) (bool, []error) {
|
||||
for _, c := range o {
|
||||
// Before running the check handle the case there the version is
|
||||
// a prerelease and the check is not searching for prereleases.
|
||||
if !(cs.IncludePrerelease || cs.containsPre[i]) && v.pre != "" {
|
||||
if !cs.IncludePrerelease && !cs.containsPre[i] && v.pre != "" {
|
||||
if !prerelesase {
|
||||
em := fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v)
|
||||
em := fmt.Errorf("%q is a prerelease version and the constraint is only looking for release versions", v)
|
||||
e = append(e, em)
|
||||
prerelesase = true
|
||||
}
|
||||
@@ -258,7 +280,7 @@ func parseConstraint(c string) (*constraint, error) {
|
||||
if len(c) > 0 {
|
||||
m := constraintRegex.FindStringSubmatch(c)
|
||||
if m == nil {
|
||||
return nil, fmt.Errorf("improper constraint: %s", c)
|
||||
return nil, fmt.Errorf("improper constraint: %q", c)
|
||||
}
|
||||
|
||||
cs := &constraint{
|
||||
@@ -325,7 +347,7 @@ func constraintNotEqual(v *Version, c *constraint, includePre bool) (bool, error
|
||||
// The existence of prereleases is checked at the group level and passed in.
|
||||
// Exit early if the version has a prerelease but those are to be ignored.
|
||||
if v.Prerelease() != "" && !includePre {
|
||||
return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v)
|
||||
return false, fmt.Errorf("%q is a prerelease version and the constraint is only looking for release versions", v)
|
||||
}
|
||||
|
||||
if c.dirty {
|
||||
@@ -335,7 +357,7 @@ func constraintNotEqual(v *Version, c *constraint, includePre bool) (bool, error
|
||||
if c.con.Minor() != v.Minor() && !c.minorDirty {
|
||||
return true, nil
|
||||
} else if c.minorDirty {
|
||||
return false, fmt.Errorf("%s is equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is equal to %q", v, c.orig)
|
||||
} else if c.con.Patch() != v.Patch() && !c.patchDirty {
|
||||
return true, nil
|
||||
} else if c.patchDirty {
|
||||
@@ -345,15 +367,15 @@ func constraintNotEqual(v *Version, c *constraint, includePre bool) (bool, error
|
||||
if eq {
|
||||
return true, nil
|
||||
}
|
||||
return false, fmt.Errorf("%s is equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is equal to %q", v, c.orig)
|
||||
}
|
||||
return false, fmt.Errorf("%s is equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is equal to %q", v, c.orig)
|
||||
}
|
||||
}
|
||||
|
||||
eq := v.Equal(c.con)
|
||||
if eq {
|
||||
return false, fmt.Errorf("%s is equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is equal to %q", v, c.orig)
|
||||
}
|
||||
|
||||
return true, nil
|
||||
@@ -364,7 +386,7 @@ func constraintGreaterThan(v *Version, c *constraint, includePre bool) (bool, er
|
||||
// The existence of prereleases is checked at the group level and passed in.
|
||||
// Exit early if the version has a prerelease but those are to be ignored.
|
||||
if v.Prerelease() != "" && !includePre {
|
||||
return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v)
|
||||
return false, fmt.Errorf("%q is a prerelease version and the constraint is only looking for release versions", v)
|
||||
}
|
||||
|
||||
var eq bool
|
||||
@@ -374,17 +396,17 @@ func constraintGreaterThan(v *Version, c *constraint, includePre bool) (bool, er
|
||||
if eq {
|
||||
return true, nil
|
||||
}
|
||||
return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is less than or equal to %q", v, c.orig)
|
||||
}
|
||||
|
||||
if v.Major() > c.con.Major() {
|
||||
return true, nil
|
||||
} else if v.Major() < c.con.Major() {
|
||||
return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is less than or equal to %q", v, c.orig)
|
||||
} else if c.minorDirty {
|
||||
// This is a range case such as >11. When the version is something like
|
||||
// 11.1.0 is it not > 11. For that we would need 12 or higher
|
||||
return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is less than or equal to %q", v, c.orig)
|
||||
} else if c.patchDirty {
|
||||
// This is for ranges such as >11.1. A version of 11.1.1 is not greater
|
||||
// which one of 11.2.1 is greater
|
||||
@@ -392,7 +414,7 @@ func constraintGreaterThan(v *Version, c *constraint, includePre bool) (bool, er
|
||||
if eq {
|
||||
return true, nil
|
||||
}
|
||||
return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is less than or equal to %q", v, c.orig)
|
||||
}
|
||||
|
||||
// If we have gotten here we are not comparing pre-preleases and can use the
|
||||
@@ -401,21 +423,21 @@ func constraintGreaterThan(v *Version, c *constraint, includePre bool) (bool, er
|
||||
if eq {
|
||||
return true, nil
|
||||
}
|
||||
return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is less than or equal to %q", v, c.orig)
|
||||
}
|
||||
|
||||
func constraintLessThan(v *Version, c *constraint, includePre bool) (bool, error) {
|
||||
// The existence of prereleases is checked at the group level and passed in.
|
||||
// Exit early if the version has a prerelease but those are to be ignored.
|
||||
if v.Prerelease() != "" && !includePre {
|
||||
return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v)
|
||||
return false, fmt.Errorf("%q is a prerelease version and the constraint is only looking for release versions", v)
|
||||
}
|
||||
|
||||
eq := v.Compare(c.con) < 0
|
||||
if eq {
|
||||
return true, nil
|
||||
}
|
||||
return false, fmt.Errorf("%s is greater than or equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is greater than or equal to %q", v, c.orig)
|
||||
}
|
||||
|
||||
func constraintGreaterThanEqual(v *Version, c *constraint, includePre bool) (bool, error) {
|
||||
@@ -423,21 +445,21 @@ func constraintGreaterThanEqual(v *Version, c *constraint, includePre bool) (boo
|
||||
// The existence of prereleases is checked at the group level and passed in.
|
||||
// Exit early if the version has a prerelease but those are to be ignored.
|
||||
if v.Prerelease() != "" && !includePre {
|
||||
return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v)
|
||||
return false, fmt.Errorf("%q is a prerelease version and the constraint is only looking for release versions", v)
|
||||
}
|
||||
|
||||
eq := v.Compare(c.con) >= 0
|
||||
if eq {
|
||||
return true, nil
|
||||
}
|
||||
return false, fmt.Errorf("%s is less than %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is less than %q", v, c.orig)
|
||||
}
|
||||
|
||||
func constraintLessThanEqual(v *Version, c *constraint, includePre bool) (bool, error) {
|
||||
// The existence of prereleases is checked at the group level and passed in.
|
||||
// Exit early if the version has a prerelease but those are to be ignored.
|
||||
if v.Prerelease() != "" && !includePre {
|
||||
return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v)
|
||||
return false, fmt.Errorf("%q is a prerelease version and the constraint is only looking for release versions", v)
|
||||
}
|
||||
|
||||
var eq bool
|
||||
@@ -447,13 +469,13 @@ func constraintLessThanEqual(v *Version, c *constraint, includePre bool) (bool,
|
||||
if eq {
|
||||
return true, nil
|
||||
}
|
||||
return false, fmt.Errorf("%s is greater than %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is greater than %q", v, c.orig)
|
||||
}
|
||||
|
||||
if v.Major() > c.con.Major() {
|
||||
return false, fmt.Errorf("%s is greater than %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is greater than %q", v, c.orig)
|
||||
} else if v.Major() == c.con.Major() && v.Minor() > c.con.Minor() && !c.minorDirty {
|
||||
return false, fmt.Errorf("%s is greater than %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is greater than %q", v, c.orig)
|
||||
}
|
||||
|
||||
return true, nil
|
||||
@@ -469,11 +491,11 @@ func constraintTilde(v *Version, c *constraint, includePre bool) (bool, error) {
|
||||
// The existence of prereleases is checked at the group level and passed in.
|
||||
// Exit early if the version has a prerelease but those are to be ignored.
|
||||
if v.Prerelease() != "" && !includePre {
|
||||
return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v)
|
||||
return false, fmt.Errorf("%q is a prerelease version and the constraint is only looking for release versions", v)
|
||||
}
|
||||
|
||||
if v.LessThan(c.con) {
|
||||
return false, fmt.Errorf("%s is less than %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is less than %q", v, c.orig)
|
||||
}
|
||||
|
||||
// ~0.0.0 is a special case where all constraints are accepted. It's
|
||||
@@ -484,11 +506,11 @@ func constraintTilde(v *Version, c *constraint, includePre bool) (bool, error) {
|
||||
}
|
||||
|
||||
if v.Major() != c.con.Major() {
|
||||
return false, fmt.Errorf("%s does not have same major version as %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q does not have same major version as %q", v, c.orig)
|
||||
}
|
||||
|
||||
if v.Minor() != c.con.Minor() && !c.minorDirty {
|
||||
return false, fmt.Errorf("%s does not have same major and minor version as %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q does not have same major and minor version as %q", v, c.orig)
|
||||
}
|
||||
|
||||
return true, nil
|
||||
@@ -500,7 +522,7 @@ func constraintTildeOrEqual(v *Version, c *constraint, includePre bool) (bool, e
|
||||
// The existence of prereleases is checked at the group level and passed in.
|
||||
// Exit early if the version has a prerelease but those are to be ignored.
|
||||
if v.Prerelease() != "" && !includePre {
|
||||
return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v)
|
||||
return false, fmt.Errorf("%q is a prerelease version and the constraint is only looking for release versions", v)
|
||||
}
|
||||
|
||||
if c.dirty {
|
||||
@@ -512,7 +534,7 @@ func constraintTildeOrEqual(v *Version, c *constraint, includePre bool) (bool, e
|
||||
return true, nil
|
||||
}
|
||||
|
||||
return false, fmt.Errorf("%s is not equal to %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is not equal to %q", v, c.orig)
|
||||
}
|
||||
|
||||
// ^* --> (any)
|
||||
@@ -528,12 +550,12 @@ func constraintCaret(v *Version, c *constraint, includePre bool) (bool, error) {
|
||||
// The existence of prereleases is checked at the group level and passed in.
|
||||
// Exit early if the version has a prerelease but those are to be ignored.
|
||||
if v.Prerelease() != "" && !includePre {
|
||||
return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v)
|
||||
return false, fmt.Errorf("%q is a prerelease version and the constraint is only looking for release versions", v)
|
||||
}
|
||||
|
||||
// This less than handles prereleases
|
||||
if v.LessThan(c.con) {
|
||||
return false, fmt.Errorf("%s is less than %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q is less than %q", v, c.orig)
|
||||
}
|
||||
|
||||
var eq bool
|
||||
@@ -548,12 +570,12 @@ func constraintCaret(v *Version, c *constraint, includePre bool) (bool, error) {
|
||||
if eq {
|
||||
return true, nil
|
||||
}
|
||||
return false, fmt.Errorf("%s does not have same major version as %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q does not have same major version as %q", v, c.orig)
|
||||
}
|
||||
|
||||
// ^ when the major is 0 and minor > 0 is >=0.y.z < 0.y+1
|
||||
if c.con.Major() == 0 && v.Major() > 0 {
|
||||
return false, fmt.Errorf("%s does not have same major version as %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q does not have same major version as %q", v, c.orig)
|
||||
}
|
||||
// If the con Minor is > 0 it is not dirty
|
||||
if c.con.Minor() > 0 || c.patchDirty {
|
||||
@@ -561,11 +583,11 @@ func constraintCaret(v *Version, c *constraint, includePre bool) (bool, error) {
|
||||
if eq {
|
||||
return true, nil
|
||||
}
|
||||
return false, fmt.Errorf("%s does not have same minor version as %s. Expected minor versions to match when constraint major version is 0", v, c.orig)
|
||||
return false, fmt.Errorf("%q does not have same minor version as %q. Expected minor versions to match when constraint major version is 0", v, c.orig)
|
||||
}
|
||||
// ^ when the minor is 0 and minor > 0 is =0.0.z
|
||||
if c.con.Minor() == 0 && v.Minor() > 0 {
|
||||
return false, fmt.Errorf("%s does not have same minor version as %s", v, c.orig)
|
||||
return false, fmt.Errorf("%q does not have same minor version as %q", v, c.orig)
|
||||
}
|
||||
|
||||
// At this point the major is 0 and the minor is 0 and not dirty. The patch
|
||||
@@ -574,7 +596,7 @@ func constraintCaret(v *Version, c *constraint, includePre bool) (bool, error) {
|
||||
if eq {
|
||||
return true, nil
|
||||
}
|
||||
return false, fmt.Errorf("%s does not equal %s. Expect version and constraint to equal when major and minor versions are 0", v, c.orig)
|
||||
return false, fmt.Errorf("%q does not equal %q. Expect version and constraint to equal when major and minor versions are 0", v, c.orig)
|
||||
}
|
||||
|
||||
func isX(x string) bool {
|
||||
|
||||
+38
-1
@@ -6,6 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -48,8 +49,16 @@ var (
|
||||
|
||||
// ErrInvalidPrerelease is returned when the pre-release is an invalid format
|
||||
ErrInvalidPrerelease = errors.New("invalid prerelease string")
|
||||
|
||||
// ErrVersionTooLong is returned when a version string exceeds the
|
||||
// maximum allowed length.
|
||||
ErrVersionTooLong = fmt.Errorf("version string is too long (max %d bytes)", MaxVersionLen)
|
||||
)
|
||||
|
||||
// MaxVersionLen is the maximum allowed length of a version string. This guards
|
||||
// against unbounded input causing excessive memory allocations during parsing.
|
||||
const MaxVersionLen = 256
|
||||
|
||||
// semVerRegex is the regular expression used to parse a semantic version.
|
||||
// This is not the official regex from the semver spec. It has been modified to allow for loose handling
|
||||
// where versions like 2.1 are detected.
|
||||
@@ -94,6 +103,10 @@ func StrictNewVersion(v string) (*Version, error) {
|
||||
return nil, ErrEmptyString
|
||||
}
|
||||
|
||||
if len(v) > MaxVersionLen {
|
||||
return nil, ErrVersionTooLong
|
||||
}
|
||||
|
||||
// Split the parts into [0]major, [1]minor, and [2]patch,prerelease,build
|
||||
parts := strings.SplitN(v, ".", 3)
|
||||
if len(parts) != 3 {
|
||||
@@ -161,6 +174,9 @@ func StrictNewVersion(v string) (*Version, error) {
|
||||
// attempts to convert it to SemVer. If you want to validate it was a strict
|
||||
// semantic version at parse time see StrictNewVersion().
|
||||
func NewVersion(v string) (*Version, error) {
|
||||
if len(v) > MaxVersionLen {
|
||||
return nil, ErrVersionTooLong
|
||||
}
|
||||
if CoerceNewVersion {
|
||||
return coerceNewVersion(v)
|
||||
}
|
||||
@@ -289,6 +305,8 @@ func coerceNewVersion(v string) (*Version, error) {
|
||||
|
||||
// New creates a new instance of Version with each of the parts passed in as
|
||||
// arguments instead of parsing a version string.
|
||||
// Note, New does not validate prerelease or metadata. Incorrect information can
|
||||
// be passed in.
|
||||
func New(major, minor, patch uint64, pre, metadata string) *Version {
|
||||
v := Version{
|
||||
major: major,
|
||||
@@ -301,6 +319,7 @@ func New(major, minor, patch uint64, pre, metadata string) *Version {
|
||||
|
||||
v.original = v.String()
|
||||
|
||||
// TODO: In the next semver major version validate the pre and metadata. Return error if there is one.
|
||||
return &v
|
||||
}
|
||||
|
||||
@@ -388,6 +407,9 @@ func (v Version) IncPatch() Version {
|
||||
} else {
|
||||
vNext.metadata = ""
|
||||
vNext.pre = ""
|
||||
if v.patch == math.MaxUint64 {
|
||||
panic("patch version increment would overflow uint64")
|
||||
}
|
||||
vNext.patch = v.patch + 1
|
||||
}
|
||||
vNext.original = v.originalVPrefix() + "" + vNext.String()
|
||||
@@ -404,6 +426,9 @@ func (v Version) IncMinor() Version {
|
||||
vNext.metadata = ""
|
||||
vNext.pre = ""
|
||||
vNext.patch = 0
|
||||
if v.minor == math.MaxUint64 {
|
||||
panic("minor version increment would overflow uint64")
|
||||
}
|
||||
vNext.minor = v.minor + 1
|
||||
vNext.original = v.originalVPrefix() + "" + vNext.String()
|
||||
return vNext
|
||||
@@ -421,6 +446,9 @@ func (v Version) IncMajor() Version {
|
||||
vNext.pre = ""
|
||||
vNext.patch = 0
|
||||
vNext.minor = 0
|
||||
if v.major == math.MaxUint64 {
|
||||
panic("major version increment would overflow uint64")
|
||||
}
|
||||
vNext.major = v.major + 1
|
||||
vNext.original = v.originalVPrefix() + "" + vNext.String()
|
||||
return vNext
|
||||
@@ -568,7 +596,16 @@ func (v Version) MarshalText() ([]byte, error) {
|
||||
// Scan implements the SQL.Scanner interface.
|
||||
func (v *Version) Scan(value interface{}) error {
|
||||
var s string
|
||||
s, _ = value.(string)
|
||||
switch t := value.(type) {
|
||||
case string:
|
||||
s = t
|
||||
case []byte:
|
||||
s = string(t)
|
||||
case nil:
|
||||
return fmt.Errorf("cannot scan nil into Version")
|
||||
default:
|
||||
return fmt.Errorf("unsupported Scan type %T", value)
|
||||
}
|
||||
temp, err := NewVersion(s)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
+12
@@ -28,6 +28,18 @@ Retrieve and consider the comments on the PR, which may have come from GitHub Co
|
||||
|
||||
Offer to optionally post a brief summary of the review to the PR, via the gh CLI tool.
|
||||
|
||||
## Tagged Go releases
|
||||
|
||||
If I ask you whether we are ready to release, this means a tagged Go release on the main branch. Go releases are git tagged with a version number.
|
||||
|
||||
Review the changes since the last release, i.e. the previous git tag. Ensure that the changes are complete and correct. Identify new features, bug fixes, and performance improvements.
|
||||
|
||||
Identify breaking changes, especially API changes.
|
||||
|
||||
Ensure good test coverage. Look for performance changes, especially performance regressions, by running benchmarks against the previous release.
|
||||
|
||||
Ensure that the documentation in READMEs and GoDocs are complete, correct and consistent.
|
||||
|
||||
## Comparisons to go-runewidth
|
||||
|
||||
We originally attempted to make this package compatible with go-runewidth.
|
||||
|
||||
+14
@@ -1,5 +1,19 @@
|
||||
# Changelog
|
||||
|
||||
## [0.11.0]
|
||||
|
||||
[Compare](https://github.com/clipperhouse/displaywidth/compare/v0.10.0...v0.11.0)
|
||||
|
||||
### Added
|
||||
- New `ControlSequences8Bit` option to treat 8-bit ECMA-48 (C1) escape sequences as zero-width. (#22)
|
||||
|
||||
### Changed
|
||||
- Upgraded uax29 dependency to v2.7.0 for 8-bit escape sequence support in the grapheme iterator.
|
||||
- Truncation now validates that preserved trailing escape sequences are zero-width, preventing edge cases where non-zero-width sequences could leak into output.
|
||||
|
||||
### Note
|
||||
- `ControlSequences8Bit` is deliberately ignored by `TruncateString` and `TruncateBytes`, because C1 byte values (0x80–0x9F) overlap with UTF-8 multi-byte encoding.
|
||||
|
||||
## [0.10.0]
|
||||
|
||||
[Compare](https://github.com/clipperhouse/displaywidth/compare/v0.9.0...v0.10.0)
|
||||
|
||||
Loaded 100 of 318 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user