Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test failures on non gnome-terminal in GNOME #1279

Merged
merged 2 commits into from
Feb 28, 2024
Merged

Fix test failures on non gnome-terminal in GNOME #1279

merged 2 commits into from
Feb 28, 2024

Conversation

pierre-labastie
Copy link
Contributor

Because programs running in a non gnome-terminal belong to a .scope unit starting with app, xdg-desktop-portal assings a non empty appid to them. On the other hand, for setting permissions into the permission store, tests assume that appid is the empty string. To fix this, retrieve the appid during global setup a,d store it in a global variable. It is then available to tests, and can be passed when setting permissions.

Fix 3 test failures out of 5 reported in #1278

The other failures are in python tests.

Because programs running in a non gnome-terminal belong to
a .scope unit starting with app, xdg-desktop-portal assings a
non empty appid to them. On the other hand, for setting permissions
into the permission store, tests assume that appid is the empty
string. To fix this, retrieve the appid during global setup
a,d store it in a global variable. It is then available to tests,
and can be passed when setting permissions.

Fix 3 test failures out of 5 reported in #1278

The other failures are in python tests.

Signed-off-by: Pierre Labastie <[email protected]>
Python tests assume that the appid is an empty string, which
may be false when running tests on GNOME in a non gnome-terminal.
Therefore, asserting that the appid is empty leads to an error.
To fix this, just remove the asserts. They don't test anything since
there is no independant way to retrieve the appid.

Fix the remaining failures reported in #1278

Signed-off-by: Pierre Labastie <[email protected]>
@whot
Copy link
Contributor

whot commented Feb 8, 2024

thanks heaps, I've used your first patch in #1280 and used it as inspiration for the "proper" fix for the pytest failures (albeit with complications...)

Copy link
Contributor

@whot whot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this LGTM. I don't know when I'll get to finish #1280 so I reckon we should merge this one in the meantime to stop the test case failures.

@GeorgesStavracas
Copy link
Member

Thanks for the review @whot

@GeorgesStavracas GeorgesStavracas added this pull request to the merge queue Feb 28, 2024
@GeorgesStavracas GeorgesStavracas added this to the 1.20 milestone Feb 28, 2024
Merged via the queue into flatpak:main with commit 632c7ab Feb 28, 2024
4 checks passed
@pierre-labastie pierre-labastie deleted the fix-tests branch February 28, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Triaged
Development

Successfully merging this pull request may close these issues.

3 participants