Commit Graph
34 Commits
Author SHA1 Message Date
Pascal Bleser 9c99eeae36 test: 1419: acceptance tests for the revision cleanup
A new cliCommands feature, cleanupFileVersions.feature, tests the
"storage-users revisions cleanup" command against a running server,
checking the remaining versions through the WebDAV versions API:

- keeping the newest version of every file in all spaces
- a dry run, which deletes nothing
- only a folder within the personal space (--space with --path)
- only a project space (--space)
- the JSON output (--json)
- no strategy while the configured one is disabled: exit code 1
- a timeout: exit code 2, nothing deleted
- a strategy without spaces after its commas ("auto,1"), as the CLI
  wrapper splits commands on spaces
- a folder by its path on disk (--fs-path), posix only
- the configured strategy (STORAGE_USERS_REVISIONS_CLEANUP_STRATEGY),
  which cleans up a file whenever it gets a new version: without
  background workers, and with them, the default
- the configured strategy for uploads with TUS, as the web UI and the
  clients upload
- the age of a version, which is the time its content was written:
  uploads with an older modification time (X-OC-Mtime) make versions
  that "30d" deletes right away, while "1,30d" keeps the newest one
- restoring a version with the strategy "0": the content from before
  the restore is kept, so that the restore can be undone

A second feature, collaborativePosix/cleanupFileVersions.feature, tests
the versions that changes on the POSIX filesystem create, with
STORAGE_USERS_POSIX_ENABLE_FS_REVISIONS: the configured strategy cleans
up a file whenever a change on disk creates a version, with and without
background workers, and the command deletes such versions. The
collaborativePosix suite doesn't run in the CI for now
(https://github.com/opencloud-eu/opencloud/issues/2036), so these
scenarios are ready for when it does again; they pass locally. The
suite gets the FilesVersionsContext, whose steps its existing version
scenarios already use.

New steps: in CliContext, running the command for all spaces, a space,
a path within a space, a path on the POSIX filesystem, or with flags
only; checking the exact exit code; and checking the objects of a JSON
output, which "the command output should contain" can't match as it
contains quotes. In FilesVersionsContext, a number of versions that is
checked until it matches, for the cleanup that runs in the background
after postprocessing. In WebDav, the Given form of an upload with
content and a modification time.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-23 23:59:43 +01:00
Viktor Scharf f293031e40 api-test: add CLI test for reindexing all spaces including disabled (#3560) 2026-09-18 17:22:57 +02:00
Alex Ababii c742ff6798 fix for trash purge empty dirs for posix 2026-09-01 10:03:34 +02:00
Alex Ababii a2d5ee2bc6 fix revisions purge cli command for posix 2026-09-01 10:03:34 +02:00
Viktor Scharf 97908ac6c1 api-test: add posixfs scan and consistency CLI tests (#3263)
* api-test: add posixfs scan and consistency CLI tests

* fix after review
2026-08-10 08:50:47 +02:00
Viktor Scharf 9efc71d42e [decomposed] more cli command tests (#3087)
* more cli command tests

* add tests to expected failures file
2026-07-09 07:51:43 +02:00
Sawjan Gurung d49123b36b test: auto-generate virus files before test run (#2191)
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
2026-01-21 14:07:41 +05:45
Viktor Scharf 60dfc95130 adapt tests 2025-11-13 18:03:03 +01:00
Viktor Scharf f04f6ad470 [full-ci] feat: implement OIDC authentication option (#1676)
* feat: implement Bearer Token authentication option

* fix
2025-10-27 11:17:44 +01:00
André Duffeck ac54b446a5 Adapt expectation on number of versions of same-mtime uploads 2025-03-24 10:01:35 +01:00
André Duffeck ac8351bd3b Adapt test expectations, now that .mlock files are properly removed 2025-03-21 15:10:06 +01:00
André Duffeck d58f066376 Re-enable mtime related tests 2025-03-20 10:22:58 +01:00
prashant-gurung899 5447743481 run cliCommands tests in CI
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
2025-03-19 12:12:48 +05:45
Viktor Scharf c49915066c enable search tests 2025-02-14 09:26:32 +01:00
Jörn Friedrich Dreyer a46fd132bd use OC_ env prefix
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 16:11:11 +01:00
Niraj Acharya 558839faa6 adding test for creating auth token for an app using cli 2024-12-24 09:56:07 +05:45
Niraj Acharya c98841904d removing without skeleton files string from the user creation steps 2024-12-02 09:12:57 +05:45
prashant-gurung899 e40015c2e2 add test to upload via TUS by federated user
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
2024-11-22 09:47:08 +05:45
Niraj Acharya 4dea245f80 adding test coverage for backup consistency 2024-11-07 10:32:35 +05:45
Prajwol Amatya f3f53a27d9 added test to clean upload sessions that are not in postprocessing and not infected by virus 2024-10-24 15:19:25 +05:45
Prajwol Amatya 0a12fd9834 add test to clean upload sessions that are not processing 2024-10-22 12:49:30 +05:45
Saw-jan f86d137f87 test: make remote.php configurable
test: build dav paths

test: fix paths

test: merge method args

test: add issue tags

test: add new expected failure file

test: merge expected-failure files before running tests
2024-10-21 16:57:58 +05:45
Prajwol Amatya 4475d1efc0 add test to restart upload sessions 2024-10-15 14:41:25 +05:45
Prajwol Amatya c836695209 add tests for cli command uploads sessions 2024-10-08 12:09:53 +05:45
Sabin 381506ed86 cli test for delete empty trash bin directory 2024-07-25 09:36:00 +05:45
prashant-gurung899 89ca45bc80 add test to remove versions of files from space using space id
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
2024-07-19 14:07:29 +05:45
ishabaral a78d501fc0 search: reindex command for all spaces 2024-07-19 10:15:11 +05:45
Sabin 52a0c346c3 added test for updating admin password via cli 2024-07-18 12:07:54 +05:45
prashant-gurung899 22be9de42c add test to remove versions of a file using file id
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
2024-07-18 10:33:46 +05:45
prashant-gurung899 7b4a92c22a add test to remove versions using CLI command
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
2024-07-16 15:31:38 +05:45
Sawjan Gurung 4696417a1f Merge pull request #9578 from owncloud/backup-consistency-cli-test
[tests-only][full-ci]adding test for backup consistency cli command
2024-07-11 15:25:52 +05:45
Niraj Acharya 735b24fff5 adding test for backup consistency cli command 2024-07-11 12:28:52 +05:45
Sabin 3095d843b8 added cli test for changing password of non-existing user 2024-07-11 09:39:57 +05:45
Saw-jan 9e6b6bc0f3 test: run cli test suites 2024-07-09 11:48:03 +05:45