148 Commits

Author SHA1 Message Date
James Valleroy
5de8350e0b
functional_tests: Add basic samba tests
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 11:30:55 -05:00
Joseph Nuthalapati
5b2df956e8
pagekite: Use the new app toggle button
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-20 06:26:54 +05:30
Joseph Nuthalapati
6f975a159c
pagekite: Fix functional tests
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-20 04:59:25 +05:30
Joseph Nuthalapati
00725b3526
app: Fix broken functional tests
Fix functional tests broken by the new toggle button to enable/disable
applications.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-19 00:02:16 +05:30
Joseph Nuthalapati
cd1e7b649d
tahoe: Mark Tahoe-LAFS as an advanced app
Tahoe LAFS is an app requiring some technical knowledge to use and its support
in FreedomBox is experimental. The use case of a cluster of FreedomBoxes running
Tahoe-LAFS nodes isn't tested yet. It's intended use case as a backend for the
backups app isn't implemented yet.

- Fixed functional test implementation for advanced mode
- Did not fix failing Tahoe-LAFS tests, keeping them skipped for now.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-08 13:58:55 -08:00
James Valleroy
88bf07adee
functional_tests: Update config form ids
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-04 11:30:41 -08:00
Veiko Aasa
8694849701
gitweb: Add functional tests
- add eleven functional tests
- gitweb_configure.html template: add id to the repository list element
  to distinct it better.

Closes #1668

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 23:48:56 -07:00
Sunil Mohan Adapa
b72021782e
deluge: Support deluge 2 by starting it properly
deluge-web 1.x runs in the foreground by default and provides an option -f to
fork in the background where as deluge-web 2.x by default forks into the
background and provides option --do-no-daemonize for running in foreground.
Update systemd service to ensure that option is passed appropriately based on
the version of daemon running.

Update functional tests to accommodate UI changes in deluge-web 2.x.

Closes: #1652.

Tests:

- Install deluge 1.x by having testing in apt sources.list. Ensure that the
  daemon is working. Run functional tests.

- Upgrade deluge to 2.x by changing the sources.list and upgrading. Ensure that
  daemon is working after disable/enable. Run functional tests.

- Install deluge 2.x by having unstable in apt sources.list. Ensure that daemon
  is working. Run functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:36:06 -04:00
Sunil Mohan Adapa
77737afadd
ikiwiki: Remove subsubmenu in favor of toolbar
- Merge managing table into the index page.

- Remove separate URL/view/template for manage.

- Convert create tab into a toolbar button.

- Remove cancel button from delete confirmation page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:25:54 -04:00
Sunil Mohan Adapa
e0b0b0f532
functional_tests: Fix create snapshot test failure
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>
2019-08-26 18:14:13 -04:00
James Valleroy
88cab90917
functional_tests: Use longer password when creating user
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-25 16:27:03 -04:00
Joseph Nuthalpati
cd54cd48b8
functional_tests: Fix step definition "When I log out"
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-08-18 13:33:30 -07:00
Joseph Nuthalpati
fe02b9f1e3
functional_tests: Fix site.is_available not handling default paths
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>
2019-08-18 13:33:08 -07:00
James Valleroy
a89190b700
functional_tests: Fix delete backup path
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-07-30 16:45:30 -07:00
Joseph Nuthalapati
6e0671e142
sharing: Add functional test for public shares
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-07-22 17:56:45 -04:00
Joseph Nuthalapati
7684814a5c
backups: Fix functional tests broken due to URL changes
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:37 +05:30
James Valleroy
6064067a3a
functional_tests: Add shortcut- prefix to test home page config
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-06-13 18:38:14 -07:00
James Valleroy
1600c25ae8
monkeysphere: Hide by default
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>
2019-06-10 11:16:01 -07:00
Joseph Nuthalapati
23e4aac400
searx: Improve functional tests
- 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>
2019-06-09 10:40:54 -04:00
Joseph Nuthalapati
7e1e5182cc
searx: Preserve public_access setting
- 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>
2019-06-09 10:40:49 -04:00
Joseph Nuthalapati
2d85b61199
searx: Add option to allow public access to the application
[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>
2019-06-09 10:37:16 -04:00
James Valleroy
44b25ea617
functional_tests: Install python3-pytest-django
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-04-03 22:03:52 -04:00
LoveIsGrief
35c9e591c9
functional tests: Fix wheel errors when provisioning VM
> 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>
2019-04-03 22:03:49 -04:00
LoveIsGrief
d31b0ee3c7
functional_tests: Allow provisioning VM for functional tests
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>
2019-04-03 22:03:44 -04:00
LoveIsGrief
d551d52537
i2p: Add functional tests
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-04-01 17:33:26 -07:00
Sunil Mohan Adapa
fd9b6770be
tests: Use pytest for running all tests
- 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>
2019-03-10 09:54:23 -04:00
Sunil Mohan Adapa
e7181bb18a
mediawiki: Fix tests to allow running from any directory
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:21 -04:00
Sunil Mohan Adapa
cb15d34482
functional_tests: Update todo list by removing implemented tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:18 -04:00
Sunil Mohan Adapa
0e2315486d
tests: Read functional tests conf file without assuming CWD
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:07 -04:00
Sunil Mohan Adapa
b66b15591e
tests: Mark functional tests with functional mark
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-10 09:54:04 -04:00
Sunil Mohan Adapa
895b5f1fa8
functional_tests: Reorder tests to disable apps after tests
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>
2019-03-09 21:20:42 -05:00
Joseph Nuthalapati
a4e01eb629
pagekite: Bring subsubmenu below description. Remove About section.
- Fixed broken functional tests
- Pagekite index page directly takes to configuration

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-08 14:25:26 -08:00
Joseph Nuthalapati
b18ac14377
snapshot: Fix failing functional test
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-02 10:11:33 -08:00
Joseph Nuthalapati
241d3a98d5
Disable Coquelicot for Buster release
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>
2019-02-28 18:34:14 -05:00
Sunil Mohan Adapa
ee87c00578
ttrss: Make functional test definitions specific to ttrss
- So as not to clash with future apps that may have feed add/remove capability.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-26 15:24:09 -08:00
James Valleroy
1eed7d581d
ttrss: Add backup support
- 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>
2019-02-26 15:23:47 -08:00
Joseph Nuthalapati
8bc34f84c3
config: Rename Default App to Webserver Home Page
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:30:59 -05:00
James Valleroy
e385e7a87a
monkeysphere: Re-enable functional tests
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-05 21:51:44 -05:00
James Valleroy
a3dbe56a4e
repro: Also disable functional tests
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-05 21:51:18 -05:00
James Valleroy
c5ee844cb1
shadowsocks: Use resolvable domains in functional tests
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>
2019-02-03 17:43:25 -08:00
Sunil Mohan Adapa
22dd2d26f3
mldonkey: Add functional test for uploading
- 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>
2019-01-28 10:54:53 -08:00
J. Carlos Romero
1c8c9d067a
mldonkey: Add backup/restore support
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-28 10:54:27 -08:00
James Valleroy
b8737ad663
help: Add functional test to check status logs page
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-28 09:57:02 -08:00
Sunil Mohan Adapa
c35cecb34a
openvpn: Add backup/restore support
- Add functional tests

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-27 08:16:24 -05:00
James Valleroy
af018e3018
radicale: Add functional tests for setting access rights
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-26 22:06:57 -08:00
Sunil Mohan Adapa
529c281734
syncthing: Add backup/restore support
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-26 21:30:29 -05:00
Sunil Mohan Adapa
260dcd4d32
mldonkey: Update description and minor updates
- 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>
2019-01-25 14:39:31 -08:00
J. Carlos Romero
548c6b98f3
mldonkey: Add new module for the eDonkey network
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-25 14:39:10 -08:00
Sunil Mohan Adapa
1ec5b213ad
snapshot: Minor styling fixes
- Avoid use of _ in functional steps.

- flake8 fixes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 14:00:26 -08:00
Joseph Nuthalapati
0b9922434c
snapshot: Fix failing tests
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 14:00:11 -08:00