Repository navigation
Conversation
The preferences tests delete ~/.config/opensnitch/settings.conf and write it through QSettings, and pressing Apply calls Autostart.enable(), which can create, remove or hide ~/.config/autostart/opensnitch_ui.desktop. Running the suite on a machine with OpenSnitch installed therefore replaced the user's real UI settings. Redirect HOME and the XDG dirs to a temporary directory before opensnitch is imported (utils/xdg.py caches the paths at import time), and add a session fixture that fails if the paths resolve outside of it or if the real settings.conf or autostart file changed during the run.
- the columns of the events view are saved per table (STATS_SHOW_COLUMNS + "_connections"). - the preferences sections are in stackedWidget, and the update flag is node_needs_update. - the "deny" default action is now "drop" (ACTION_DROP_IDX). - test_cancel_discards_changes: select an action different from the saved one, otherwise the test does not check anything.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On master, 4 tests in
ui/tests/dialogs/test_preferences.pyfail. The cause is renames in the code, not bugs in the UI:test_save_ui_settingsSTATS_SHOW_COLUMNS + "_connections"test_save_node_settingstabWidgetis nowstackedWidget,_node_needs_updateis nownode_needs_updatetest_action_deny_settingConfig.ACTION_DENY_IDXno longer exists; the default action combo offers drop / allow / rejecttest_action_drop_setting, usingACTION_DROP_IDXtest_cancel_discards_changesACTION_DENY_IDXResult:
ui/testsgoes from 94 passed / 4 failed to 98 passed, stable over repeated runs. Each fixed test also passes on its own.This is based on #1678, because running the tests without it resets the settings of an installed UI. Only the last commit (
ui, tests: fixed preferences tests broken by renames) is new here. If you prefer it independent of #1678, I can rebase it onto master.