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




commit 3394117458b2818742bbc1c7dc504695a9d88b2f
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 9b3db0125..9052ae0e0 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 */
@@ -1038,7 +1038,7 @@ gs_plugins_flatpak_broken_remote_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
        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"));
        g_assert_cmpstr (gs_app_get_url (app, AS_URL_KIND_HOMEPAGE), ==, "http://127.0.0.1/";);
        g_assert_cmpstr (gs_app_get_name (app), ==, "Chiron");
        g_assert_cmpstr (gs_app_get_summary (app), ==, "Single line synopsis");
@@ -1201,7 +1201,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
                g_assert_true (gs_flatpak_app_get_file_kind (app) == GS_FLATPAK_APP_FILE_KIND_BUNDLE);
        } else {
                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"));
                g_assert_true (gs_flatpak_app_get_file_kind (app) == GS_FLATPAK_APP_FILE_KIND_REF);
                g_assert_cmpstr (gs_app_get_url (app, AS_URL_KIND_HOMEPAGE), ==, "http://127.0.0.1/";);
                g_assert_cmpstr (gs_app_get_description (app), ==, "Long description.");


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