-
Notifications
You must be signed in to change notification settings - Fork 509
Add integration tests for notifications #7093
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
Add integration tests for notifications #7093
Conversation
0b2ff07 to
69c1b5e
Compare
danxuliu
left a 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.
Rather than installing the notifications app only in Drone I would add:
NOTIFICATIONS_BRANCH="master"
# Add Notifications app to the parent directory of "spreed" (unless it is
# already there or in "apps").
if [ ! -e "${ROOT_DIR}/apps/notifications" ] && [ ! -e "../../../notifications" ]; then
(cd ../../../ && git clone --depth 1 --branch ${NOTIFICATIONS_BRANCH} https://github.com/nextcloud/notifications)
fi
to the run.sh file to ensure that the notifications app is installed if needed, no matter if the integration tests are run in Drone, by directly calling ./run.sh or in Docker with ./run-docker.sh.
|
We do it like this with guests app too atm |
|
Added installing of both apps in run.sh and added another check for additional app directories |
danxuliu
left a 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.
Other than the comments, 👍
I have added a fixup to remove resetting the current user in user :user has the following notifications, as it is not needed and inconsistent with the rest of steps that get the user as a parameter, and another fixup to simplify cloning the needed apps, as it should not be needed to manually check the paths if app:getpath returned false.
| ->executeStatement(); | ||
| } catch (\Throwable $e) { | ||
| // Ignore | ||
| } |
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.
The other queries are not guarded against exceptions, should they be guarded too or they will always succeed and this one has something special that could cause the query to throw in some cases?
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.
This one is guarded as it is against the table of another app and I thought better save then annoyed
| When user "participant1" creates room "one-to-one room" (v4) | ||
| | roomType | 1 | | ||
| | invite | participant2 | | ||
| Given user "participant2" joins room "one-to-one room" with 200 (v4) |
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.
I would say that everything before sending the message should be a precondition, and therefore the steps should be prefixed by Given and And (here and in all the scenarios of this file), but I guess that is just a matter of taste :-)
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
… added for the desktop client Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
4c6e715 to
65ae297
Compare
Signed-off-by: Joas Schilling [email protected]