Skip to content

Commit 4ffb553

Browse files
committed
Fix CI: add share rate limit override and strengthen test passwords
1 parent 195648a commit 4ffb553

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/tests-integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ jobs:
5858
docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ config:system:set ratelimit_protection_enabled --value=false --type=boolean"
5959
docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ config:system:set auth.bruteforce.protection.enabled --value=false --type=boolean"
6060
docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ config:system:set loglevel --value=0 --type=integer"
61+
docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ config:system:set ratelimit_overwrite files_sharing.shareapi.createshare user limit --value=1000 --type=integer"
62+
docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ config:system:set ratelimit_overwrite files_sharing.shareapi.createshare user period --value=60 --type=integer"
6163
docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ app:install spreed" || echo "spreed already installed"
6264
docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ app:install admin_notifications" || echo "admin_notifications already installed"
6365
docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ app:list" | head -30

tests/integration/test_shares.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async def test_create_public_link(self, nc_mcp: McpTestHelper) -> None:
113113
@pytest.mark.asyncio
114114
async def test_create_link_with_password(self, nc_mcp: McpTestHelper) -> None:
115115
await _setup_share_file(nc_mcp)
116-
result = await nc_mcp.call("create_share", path=f"/{SHARE_FILE}", share_type=3, password="secret123")
116+
result = await nc_mcp.call("create_share", path=f"/{SHARE_FILE}", share_type=3, password="s3Cr3t!Pw9#xK")
117117
share = json.loads(result)
118118
assert share["share_type"] == 3
119119
assert share.get("has_password") is True
@@ -154,7 +154,7 @@ async def test_create_link_with_all_options(self, nc_mcp: McpTestHelper) -> None
154154
"create_share",
155155
path=f"/{SHARE_FILE}",
156156
share_type=3,
157-
password="secret123",
157+
password="s3Cr3t!Pw9#xK",
158158
expire_date="2099-12-31",
159159
note="Review this",
160160
label="Full options link",

0 commit comments

Comments
 (0)