Enabling the "send password by Talk" property of shares require that
Talk is installed and enabled, so the Drone step that runs them has to
first clone the Talk repository.
When the integration tests are run on a local development instance,
however, it is not guaranteed that Talk is installed. Due to this the
"@Talk" tag was added, which ensures that any feature or scenario marked
with it will first check if Talk is installed and, if not, skip the
scenario (instead of failing).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
In most cases, when a mail share is created or updated an e-mail is sent
to the sharee, which is done by connecting to the SMTP server set in the
configuration. If the server can not be contacted then the creation or
update of the mail share fails.
To make possible to test mail shares without using a real SMTP server a
fake one has been added. The original script, which is MIT licensed, was
based on inetd, so it was slightly modified to run on its own.
In order to use it from the integration tests the "Given dummy mail
server is listening" step has to be called in the scenarios in which the
mail server is needed.
For now that is the only available step; things like checking the sent
mails, while possible (as the script can log the mails to certain file),
have not been added yet.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Note that the "last link share can be downloaded" step was kept as it
tests the "url" property specific of link shares.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Now all incoming shares need to be explicitly accepted before being able
to use the shared file or get information about a reshare (although
getting the information of the incoming share is possible before
accepting it).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This makes possible to use steps that reference the last share, which
will be needed to accept pending shares.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This will be needed to test scenarios in which updating a share return a
different HTTP status code, like 401.
The assertion for the 200 HTTP status code was added in those scenarios
that tested updating a share (that is, those that were also checking the
OCS status code), but not in those in which updating a share was just a
preparatory step for the actual test (in the same way that the HTTP
status code is not checked in those tests when creating a share).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The tests check an user share and a link share; there is a slight
difference in style between them as each one is based on the test above
it, which tests increasing reshare permissions.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The admin user is not deleted after each integration test is run, so
folders created by the admin user in one test are still there when the
next tests run; tests should be independent one from each other, so a
regular user that is created and deleted for each test should be used
instead.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>