test: fix public link related test for k8s deployment

This commit is contained in:
Niraj Acharya committed 2026-02-18 12:14:32 +05:45
1 parent 170dfb1c7d
commit 2702ca3650
14 files changed
+75 -48

No files matched your search

+1
View File
@@ -3837,6 +3837,7 @@ def prepareOcisDeployment():
"sed -i '/{{- define \"ocis.basicServiceTemplates\" -}}/a\\\\ {{- $_ := set .scope \"appNameAuthBasic\" \"authbasic\" -}}' ./charts/ocis/templates/_common/_tplvalues.tpl",
"sed -i '/- name: IDM_ADMIN_PASSWORD/{n;N;N;N;d;}' ./charts/ocis/templates/idm/deployment.yaml",
"sed -i '/- name: IDM_ADMIN_PASSWORD/a\\\\\\n value: \"admin\"' ./charts/ocis/templates/idm/deployment.yaml",
"sed -i '/- name: STORAGE_PUBLICLINK_DEBUG_ADDR/i\\\\ {{- include \"ocis.persistentStore\" . | nindent 12 }}\\\n' ./charts/ocis/templates/storagepubliclink/deployment.yaml",
"sed -i '/- name: PROXY_HTTP_ADDR/i\\\\ - name: PROXY_ENABLE_BASIC_AUTH\\\n value: \"true\"' ./charts/ocis/templates/proxy/deployment.yaml",
"sed -i 's|/etc/ocis/sharing-banned-passwords.txt|config/drone/banned-password-list.txt|' ./charts/ocis/templates/sharing/deployment.yaml",
"sed -i 's|- name: configs|- name: banned-passwords|' ./charts/ocis/templates/sharing/deployment.yaml",
@@ -95,7 +95,7 @@ Feature: antivirus
Scenario Outline: public uploads a file with the virus to a public share
Given using <dav-path-version> DAV path
And the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And using SharingNG
And user "Alice" has created folder "/uploadFolder"
And user "Alice" has created the following resource link share:
@@ -337,7 +337,7 @@ Feature: antivirus
@env-config
Scenario Outline: try to overwrite a file with the virus content in a public link share
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
Given the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And using <dav-path-version> DAV path
And using SharingNG
And user "Alice" has uploaded file with content "hello" to "test.txt"
@@ -74,9 +74,9 @@ Feature: PROPFIND with depth:infinity
Scenario: get the list of resources in a folder shared through public link with depth infinity
Given using SharingNG
And the following configs have been set:
| service |config | value |
| ocdav |OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY | true |
| ocdav |OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| service | config | value |
| ocdav | OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY | true |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
And user "Alice" has created the following resource link share:
| resource | simple-folder |
| space | Personal |
@@ -123,9 +123,9 @@ Feature: PROPFIND with depth:infinity
Scenario: get the list of resources in a folder shared through public link with depth infinity when depth infinity is not allowed
Given the following configs have been set:
| service | config | value |
| ocdav | OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY | false |
| sharing | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| service | config | value |
| ocdav | OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY | false |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | simple-folder |
@@ -345,8 +345,8 @@ Feature: Link sharing of project spaces
Scenario Outline: create a link share of a project-space when password is not enforced using permissions endpoint
Given using spaces DAV path
And the following configs have been set:
| service | config | value |
| sharing | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| service | config | value |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
When user "Alice" creates the following space link share using permissions endpoint of the Graph API:
@@ -387,8 +387,8 @@ Feature: Link sharing of project spaces
Scenario Outline: create a link share of a project-space when password is not enforced using root endpoint
Given using spaces DAV path
And the following configs have been set:
| service | config | value |
| sharing | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| service | config | value |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
When user "Alice" creates the following space link share using root endpoint of the Graph API:
@@ -9,8 +9,8 @@ Feature: Update a link share for a resource
@env-config
Scenario: set password on a existing link share of a project-space drive using root endpoint
Given the following configs have been set:
| service | config | value |
| sharing | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| service | config | value |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
And using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
@@ -7,8 +7,8 @@ Feature: Link share without enforcing password
| username |
| Alice |
And the following configs have been set:
| service | config | value |
| sharing | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| service | config | value |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
@issue-7879
Scenario Outline: create a link share of a folder
@@ -286,8 +286,8 @@ Feature: Update a link share for a resource
@env-config
Scenario: set password on a existing link share of a folder inside project-space using permissions endpoint
Given the following configs have been set:
| service | config | value |
| sharing | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| service | config | value |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
And using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
@@ -2,7 +2,7 @@
Feature: public link for a space
Background:
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
Given the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And these users have been created with default attributes:
| username |
| Alice |
@@ -14,7 +14,7 @@ Feature: Public can download folders from project space public link
@env-config
Scenario: download a folder from public link of a space
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
Given the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And using SharingNG
And user "Alice" has created a folder "NewFolder" in space "new-space"
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "NewFolder/test.txt"
@@ -30,7 +30,7 @@ Feature: Public can download folders from project space public link
@env-config @issue-5229
Scenario: download a folder from public link of a folder inside a space
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
Given the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And using SharingNG
And user "Alice" has created a folder "NewFolder" in space "new-space"
And user "Alice" has created a folder "NewFolder/folder" in space "new-space"
@@ -147,7 +147,10 @@ Feature: create a public link share
@env-config
Scenario Outline: getting the share information of password less public-links hides credential placeholders
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "frontend" service
Given the following configs have been set:
| service | config | value |
| frontend | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
And using OCS API version "<ocs-api-version>"
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
When user "Alice" creates a public link share using the sharing API with settings
@@ -302,7 +305,7 @@ Feature: create a public link share
@env-config @skipOnReva @issue-10071
Scenario: get the size of a file shared by public link
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
Given the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And user "Alice" has uploaded file with content "This is a test file" to "test-file.txt"
And using SharingNG
And user "Alice" has created the following resource link share:
@@ -315,7 +318,10 @@ Feature: create a public link share
@env-config @issue-10071
Scenario Outline: get the mtime of a file shared by public link
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "frontend" service
Given the following configs have been set:
| service | config | value |
| frontend | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
And using <dav-path-version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT"
When user "Alice" creates a public link share using the sharing API with settings
@@ -330,7 +336,10 @@ Feature: create a public link share
@env-config @issue-10071
Scenario Outline: get the mtime of a file inside a folder shared by public link
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "frontend" service
Given the following configs have been set:
| service | config | value |
| frontend | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
And using <dav-path-version> DAV path
And user "Alice" has created folder "testFolder"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "testFolder/file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT"
@@ -346,7 +355,11 @@ Feature: create a public link share
@env-config @skipOnReva @issue-10071
Scenario: get the mtime of a file inside a folder shared by public link using new webDAV version
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "frontend" service
Given the following configs have been set:
| service | config | value |
| frontend | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
# Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "frontend" service
And user "Alice" has created folder "testFolder"
And using SharingNG
And user "Alice" has created the following resource link share:
@@ -361,7 +374,10 @@ Feature: create a public link share
@env-config @issue-10071
Scenario: overwriting a file changes its mtime (public webDAV API)
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "frontend" service
Given the following configs have been set:
| service | config | value |
| frontend | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
And user "Alice" has created folder "testFolder"
When user "Alice" uploads file with content "uploaded content for file name ending with a dot" to "testFolder/file.txt" using the WebDAV API
And user "Alice" creates a public link share using the sharing API with settings
@@ -375,7 +391,7 @@ Feature: create a public link share
@env-config @skipOnReva @issue-10071
Scenario: check the href of a public link file
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
Given the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And using new DAV path
And user "Alice" has uploaded file with content "Random data" to "/file.txt"
And using SharingNG
@@ -7,7 +7,7 @@ Feature: copying from public link share
Background:
Given user "Alice" has been created with default attributes
And user "Alice" has created folder "/PARENT"
And the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
Scenario: copy file within a public link folder
@@ -86,13 +86,18 @@ Feature: enforce password on public link
Scenario Outline: create a public link with a password in accordance with the password policy
Given the following configs have been set:
| service | config | value |
| sharing | SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true |
| sharing | SHARING_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| sharing | SHARING_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| sharing | SHARING_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| sharing | SHARING_PASSWORD_POLICY_MIN_DIGITS | 2 |
| sharing | SHARING_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
| service | config | value |
| sharing | SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true |
| sharing | SHARING_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| sharing | SHARING_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| sharing | SHARING_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| sharing | SHARING_PASSWORD_POLICY_MIN_DIGITS | 2 |
| sharing | SHARING_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
| frontend | FRONTEND_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| frontend | FRONTEND_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| frontend | FRONTEND_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| frontend | FRONTEND_PASSWORD_POLICY_MIN_DIGITS | 2 |
| frontend | FRONTEND_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
And user "Alice" has been created with default attributes
And user "Alice" has uploaded file with content "test file" to "/testfile.txt"
And using OCS API version "<ocs-api-version>"
@@ -150,14 +155,19 @@ Feature: enforce password on public link
Scenario Outline: update a public link with a password in accordance with the password policy
Given the following configs have been set:
| service | config | value |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| sharing | SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true |
| sharing | SHARING_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| sharing | SHARING_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| sharing | SHARING_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| sharing | SHARING_PASSWORD_POLICY_MIN_DIGITS | 1 |
| sharing | SHARING_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
| service | config | value |
| sharing | SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false |
| sharing | SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD | true |
| sharing | SHARING_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| sharing | SHARING_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| sharing | SHARING_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| sharing | SHARING_PASSWORD_POLICY_MIN_DIGITS | 1 |
| sharing | SHARING_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
| frontend | FRONTEND_PASSWORD_POLICY_MIN_CHARACTERS | 13 |
| frontend | FRONTEND_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS | 3 |
| frontend | FRONTEND_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS | 2 |
| frontend | FRONTEND_PASSWORD_POLICY_MIN_DIGITS | 1 |
| frontend | FRONTEND_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS | 2 |
And user "Alice" has been created with default attributes
And user "Alice" has uploaded file with content "test file" to "/testfile.txt"
And using OCS API version "<ocs-api-version>"
@@ -111,7 +111,7 @@ Feature: list files
@env-config @issue-10071
Scenario: get the list of resources in a folder shared through public link with depth 0
Given using new DAV path
And the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And user "Alice" has created the following folders
| path |
| /simple-folder/simple-folder1/simple-folder2/simple-folder3 |
@@ -139,7 +139,7 @@ Feature: list files
@env-config @issue-10071
Scenario: get the list of resources in a folder shared through public link with depth 1
Given using new DAV path
And the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And user "Alice" has created the following folders
| path |
| /simple-folder/simple-folder1/simple-folder2/simple-folder3 |
@@ -23,7 +23,7 @@ Feature: accessing a public link share
@env-config
Scenario: access to the preview of public shared file without password
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
Given the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "testavatar.jpg"
And using SharingNG
And user "Alice" has created the following resource link share:
@@ -52,7 +52,7 @@ Feature: accessing a public link share
@env-config
Scenario: access to the preview of public shared file inside a folder without password
Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
Given the config "SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" for "sharing" service
And user "Alice" has created folder "FOLDER"
And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "FOLDER/testavatar.jpg"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "FOLDER/textfile0.txt"