When there are no snapshots present in the list of snapshots, operation to
delete all snapshots first checks that select all button and then submits the
delete snapshots button. After that it looks for delete confirmation and then
submits again. When the confirmation page is not shown, as is the case when
there are no snapshots, the button being submitted happens to be 'Create
Snapshot' button. This creates a new snapshot and the total number of snapshots
at the end of create snapshot test is 2 instead of 1.
Tests:
- Run `py.test-3 --include-functional -k snapshot`.
Closes: #1630.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Sites might have default paths like /mediawiki/Main_Page or /transmission/web.
The tests are doing an exact match on the path which is causing test failures.
Modified the support function site.is_available to handle default paths.
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Update functional test to show advanced apps.
Closes#1453.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Make tests more semantically correct
- Add implementation for missing fixture - When I log out
- Check whether file exists when disabling public access
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Preserve the setting during enable/disable as well as during backup/restore.
- Show setting as disabled when application is disabled but restore user's
original preference value on enable.
- Add functional test for this.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
[jvalleroy] Resolved merge conflict to use shortcut component.
Fixes#1590
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
> error: invalid command 'bdist_wheel'
Kept popping up in the logs. It seems like `wheel` isn't in the deps of
the installed python packages. Therefore we now install it ourselves.
freedombox/plinth#1521 - Provision VM to run function functional tests
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
It's now possible to run the tests in the VM more easily
without copy-pasting too much from HACKING.md.
`vagrant provision --provisiion-with tests` will take care of the dependencies.
freedombox/plinth#1521 - Provision VM to run function functional tests
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Create option --include-functional to run functional tests. Otherwise, they
are disabled by default. If pytest-bdd is not installed, functional tests are
not discovered at all.
- Make pytest-django discover the setting files by creating dummy manage.py in
top level directory.
- Make pytest run as './setup.py pytest'. Add alias from './setup.py test'. This
requires pytest-runner package.
- Merge .gitignore files from functional_tests/
- Update gitlab-ci.yml to run tests with coverage using pytest.
- Update HACKING.md to suggest using py.test-3 instead of old way of running.
Merge functional tests README.md into HACKING.md.
- Remove execution wrapper runtests.py as pytest-django is able to configure
Django settings before execution of tests. Update tests to explicitly ask for
Django database as database access is denied by default.
- Replace usage of python3-coverage with python3-pytest-coverage. Execution
wrappers are not required.
- Add build dependencies on pytest modules.
- Let all warnings be shown after running tests.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
To reduce memory/CPU requirement on the VM running the services for functional
tests. The following items are kept enabled as these are enabled by default in
FreedomBox.:
- NTP daemon
- Restricted console login
- Unattended upgrades
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
As confirmed by multiple users, Coquelicot is no longer useful for uploading
files, which makes it useless as a file sharing application.
We might enable it in the future if it's actively maintained once again, or find
an alternative.
- Skip functional tests
- Disable modules-enabled file
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Use backup hooks to dump and restore database.
- Add functional test for backup and restore.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Shadowsocks server will fail to start if the domain cannot be
resolved.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Run yapf for automatic formatting.
- Move disable test to the end so that after all test are run, app is usually
disabled.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
- Update description to simply and talk about multiple protocols supported.
- Don't diagnose on IPv6 as mldonkey does not listen there.
- Run yapf and isort.
- Minor styling fixes.
- Update functional tests to check for service running.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>