-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cypress tests for files_versions #37345
Fix cypress tests for files_versions #37345
Conversation
Ok, but with one comment :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not using docker compose?
a7b24de
to
f6084c9
Compare
4207857
to
13f76e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Psalm found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
In files_versions cypress tests, we wait for 1000ms between each versions uploads to make sure that the server properly create a version. Under 1s the serve does not create a version. This commit increases the wait time as it might help to ensure that the time span is enough between two uploads. Signed-off-by: Louis Chemineau <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
8de755f
to
ae0ec6f
Compare
Strongly suspecting auto expiration from deleting files, let's see |
128955a
to
f0a1163
Compare
Signed-off-by: Louis Chemineau <[email protected]>
f0a1163
to
5dc64eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skjnldsv I managed to get the tests working again. I was tricked by the auto expiration process...
The culprit is that I move the occ config:system:set versions_retention_obligation
call from dockerNode.ts
to version_expiration.cy.ts
.
Note that:
- I extended the cypress workflow to extract logs and data directory. Can be remove but seems useful. Ok to keep?
- The change also contains logic to use a random file name instead of 'test.txt'. Not needed, but it's here and it works.
if (!process.env.CI) { | ||
stopNextcloud() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to extract logs and data directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should only upload log and data on failure, no?
Signed-off-by: Louis Chemineau <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
/backport to stable26 |
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin/stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
In files_versions cypress tests, we wait for 1000ms between each versions uploads to make sure that the server properly create a version. Under 1s the serve does not create a version.This commit increases the wait time as it might help to ensure that the time span is enough between two uploads.The automatic versions expiration process was kicking in during the tests, making some versions unavailable. I changed the tests to isolate expiration process testing from other tests.