[gnome-software/mwleeds/fix-deprecated-install: 3/5] flatpak: Update remote name for flatpakref unit test




commit 85af5b8ac20ed49a350d859080a454dcb5560b7f
Author: Phaedrus Leeds <mwleeds protonmail com>
Date:   Wed Oct 13 11:19:56 2021 -0700

    flatpak: Update remote name for flatpakref unit test
    
    Now that we are using the FlatpakTransaction API instead of
    FlatpakInstallation to install flatpakref files, the RuntimeRepo= key is
    properly handled and Flatpak uses it to create a remote. In the case of
    the unit test for flatpakref installation, the RuntimeRepo file is
    called "test.flatpakrepo" so "test" becomes the name of the remote, and
    the remote is then used as the origin for the app as well since it has
    both the app and the runtime in it. So, update an assertion to account
    for the new origin remote name for the test flatpakref file.

 plugins/flatpak/gs-self-test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index dd5c8cd5c..4cfe781de 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -735,7 +735,7 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
 
        /* get runtime */
        runtime = gs_app_get_runtime (app);
-       g_assert_cmpstr (gs_app_get_unique_id (runtime), ==, "user/flatpak/*/org.test.Runtime/master");
+       g_assert_cmpstr (gs_app_get_unique_id (runtime), ==, "user/flatpak/test/org.test.Runtime/master");
        g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE_LOCAL);
 
        /* check the number of sources */
@@ -1039,7 +1039,7 @@ gs_plugins_flatpak_broken_remote_func (GsPluginLoader *plugin_loader)
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
 #if FLATPAK_CHECK_VERSION(1,1,2)
        g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
-                       "user/flatpak/chiron-origin/org.test.Chiron/master"));
+                       "user/flatpak/test/org.test.Chiron/master"));
 #else
        g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
                        "user/flatpak/org.test.Chiron-origin/org.test.Chiron/master"));
@@ -1207,7 +1207,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        } else {
 #if FLATPAK_CHECK_VERSION(1,1,2)
                g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
-                               "user/flatpak/chiron-origin/org.test.Chiron/master"));
+                               "user/flatpak/test/org.test.Chiron/master"));
 #else
                g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
                                "user/flatpak/org.test.Chiron-origin/org.test.Chiron/master"));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]