113 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
7f7b5b4e67
performance: Add basic functional tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-11 22:26:45 -07:00
Sunil Mohan Adapa
b4e6c03bd7
coturn: New app to manage Coturn TURN/STUN server
- Shows URLs and shared secret that communication servers like matrix-synapse
should be configured to. Later we will implement auto-configuring those servers.

- Allow selecting domain for the sake of TLS/DTLS certificate installation.

- Simplify systemd service file options. Drop log file and pid file support as
they are not needed with systemd. Add security options.

- Set custom configuration file by overriding systemd service file options so
that we don't have a problem with conffile prompts.

- Implement functional tests (and automatic diagnostics).

- Custom icon selected from the Noun project as Coturn project does not have
one.

- Backup/restore configuration file and certificates.

- Document some questions regarding configuration options.

Tests performed:

- App is not listed in the app page if 'advanced' flag is disabled.

- App name, icon and short description shows up correctly in apps page.

- App name, icon, short description, description, manual link, enable/disable
button and diagnostics link show up currently in app page.

- Verify that configuration used by coturn server is the FreedomBox
configuration by checking the cert path in the log output.

- PID file is not created in /var/run/turnserver/. It goes into /dev/null
according to the log output.

- No log file is created other than what is collected by systemd from command
line.

- systemctl show coturn.service shows all the intended restrictions such as
NoNewPrivileges, Protect* options.

- Run functional tests.

- Ensure that backup of configuration file works by taking backup, changing the
secret and restoring. During backup and restore coturn should be stopped and
started as per logs.

- Build Debian package. No warnings about the copyright file.

- Enabling the app enables the service and runs it.

- Disabling the app disables the service and stop it.

- All diagnostics tests pass.

- Diagnostic tests show firewall port coturn-freedombox for internal and
external networks, service coturn, and each listening port for udp4, udp6, tcp4
and tcp6.

- Information in the firewall page shows up properly. Enabling the app opens
firewall ports, and disabling it closes them.

- When the app is installed, if a cert domain is available, it will be used.
When multiple domains are available, one of them is picked.

- Status shows 4 URLs with the currently selected domain and secret key.

- Changing domain to another domain succeeds and reflects in the status
information.

- When no domain is configured. Installing the app succeeds. No domain is shown
in the list of domains.

- When domain is changed, the certificates files in /etc/coturn/certs are
overwritten.

- Certificates have the ownership turnserver:turnserver. Public key is cert.pem
has 644 permissions. Private is pkey.pem has 600 permissions. /etc/coturn/certs
is owned by root:root.

- Let's encrypt certificates are setup immediately after install.

- Port forwarding information shows all ports except for relay ports.

- Trying to create a user with username 'turnserver' throws an error. This
happens even when coturn is not installed yet.

- After installing coturn, the configuration file /etc/coturn/freedombox.conf is
created with ownership root:turnserver and permissions 640. The directory
/etc/coturn is created with ownership root:root and permissions 755.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Fix copied form_valid comment]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-02 18:51:23 -04:00
Veiko Aasa
40ac492a87
minidlna: Add functional tests that enable and disable application
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
2020-04-29 20:56:37 -07:00
Veiko Aasa
7d77a26761
datetime: Handle timesyncd service runs conditionally
systemd-timesyncd service does not run if we have another NTP daemon installed
or FreedomBox runs inside a container where the host manages the time. In this
case, make the application as unmanaged - app can't be disabled, no app
diagnostics is shown and enable/disable functional tests are skipped.

Closes #1616

Tests performed:
- Run FreedomBox inside a KVM virtualization module, check that
  systemd-timesyncd is running, datetime app can be disabled and all
  diagnostics and date_and_time functional tests pass.
- Run FreedomBox inside a systemd-nspawn container, check that
  systemd-timesyncd is not running, datetime app can't be disabled,
  the diagnostics button is not shown and two date_and_time functional tests
  are skipped.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-25 09:56:00 -04:00
Sunil Mohan Adapa
858c270b49
mediawiki: Reuse existing images in functional tests
Tests performed:

- Re-run mediawiki functional tests

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:09:56 -04:00
Sunil Mohan Adapa
89b7301962
pagekite: Fix functional tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-29 09:43:26 +03:00
Sunil Mohan Adapa
ca984a2b24
functional_tests: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:39:56 +02:00
Veiko Aasa
0f16a0fbee
storage: Show disks if FreedomBox is running in an unprivileged container
- Get disks info from df command and add info from udisks, if available.
  Before, it was other way round.
- Add a functional test that asserts root disk is available
- Remove unused key file_system_type from disks info

Closes #1765

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-02 09:40:12 -05:00
Joseph Nuthalapati
d2286ca093
functional-tests: Mark backups and security with @system
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-25 19:27:03 -08:00
Joseph Nuthalapati
eab1e577b9
functional-tests: Avoid warnings about markers
Register all markers in pytest.ini

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-25 19:26:41 -08:00
Joseph Nuthalapati
98e0ccdda0
functional-tests: Add tag @service-discovery
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-25 19:25:15 -08:00
Joseph Nuthalapati
3df23a4aa0
functional-tests: Africa/Addis_Abada is gone?
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-25 19:25:07 -08:00
James Valleroy
21ba450484
repro: Remove app
The repro app has been disabled for a long time. Its package has been
removed from Debian, and there is no sign of it returning soon.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 20:00:43 -05:00
Veiko Aasa
3a202af843
samba: Add unit and functional tests
- Add functional tests
- Add unit tests for samba views
- New dependency for running functional tests: smbclient
- Make port configurable for the smbclient

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-17 02:47:06 +05:30
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
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
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
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 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
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
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
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
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
James Valleroy
6adec225d3
radicale: Add tests for well-known URLs
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-06 17:57:43 -05:00
James Valleroy
a99c4e0901
functional_tests: Move backup test into backups feature
Remove @bind tag from backups feature.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-13 20:48:14 -05:00
Michael Pimmer
067fea7d17
Backups: functional tests update; restoring backup bugfix
- updated functional tests to work with changed UI
- fixed bug when restoring an uploaded file

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-13 18:28:31 -05:00
James Valleroy
be3e8b7939
functional_tests: Add sso tags
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-11-18 11:49:57 -05:00
Michael Pimmer
33dde221d1
Functional tests: check that browser waits for redirects to finish
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-11-17 16:22:17 -05:00
James Valleroy
006147b417
functional_tests: Remove remaining backup export steps
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-11-17 09:00:55 -05:00
Michael Pimmer
c988d468f2
Backups: functional test to download and restore an archive
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-11-17 09:00:42 -05:00