[gnome-software] Do not require PackageKit to run the unit tests



commit 24a3e6a204f1df22acb905b9f9fe34193d973d85
Author: Richard Hughes <richard hughsie com>
Date:   Fri Feb 26 10:38:55 2016 +0000

    Do not require PackageKit to run the unit tests
    
    Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=762652

 src/gs-self-test.c            |   10 +++++-----
 src/plugins/gs-plugin-dummy.c |   12 ++++++++++--
 2 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/src/gs-self-test.c b/src/gs-self-test.c
index e5c7a4b..e7c9b98 100644
--- a/src/gs-self-test.c
+++ b/src/gs-self-test.c
@@ -512,13 +512,12 @@ gs_plugin_loader_refine_func (void)
        g_assert_no_error (error);
        g_assert (ret);
 
-       ret = gs_plugin_loader_set_enabled (loader, "packagekit-refine", TRUE);
+       ret = gs_plugin_loader_set_enabled (loader, "dummy", TRUE);
        g_assert (ret);
 
        /* get the extra bits */
-       g_setenv ("GNOME_SOFTWARE_USE_PKG_DESCRIPTIONS", "1", TRUE);
-       app = gs_app_new ("gimp");
-       gs_app_add_source (app, "gimp");
+       app = gs_app_new ("gnome-boxes");
+       gs_app_add_source (app, "gnome-boxes");
        ret = gs_plugin_loader_app_refine (loader, app,
                                           GS_PLUGIN_REFINE_FLAGS_DEFAULT |
                                           GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION |
@@ -529,7 +528,8 @@ gs_plugin_loader_refine_func (void)
        g_assert_no_error (error);
        g_assert (ret);
 
-       g_assert_cmpstr (gs_app_get_licence (app), ==, "<a 
href=\"http://spdx.org/licenses/GPL-3.0+\";>GPL-3.0+</a> and <a 
href=\"http://spdx.org/licenses/GPL-3.0\";>GPL-3.0</a>");
+       g_assert_cmpstr (gs_app_get_licence (app), ==,
+                        "<a href=\"http://spdx.org/licenses/GPL-2.0+\";>GPL-2.0+</a>");
        g_assert_cmpstr (gs_app_get_description (app), !=, NULL);
        url = gs_app_get_url (app, AS_URL_KIND_HOMEPAGE);
        g_assert_cmpstr (url, ==, "http://www.gimp.org/";);
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index b0b97dd..c6b7df2 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -156,8 +156,16 @@ gs_plugin_refine (GsPlugin *plugin,
                app = GS_APP (l->data);
                if (gs_app_get_name (app) == NULL) {
                        if (g_strcmp0 (gs_app_get_id (app), "gnome-boxes") == 0) {
-                               gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Boxes");
-                               gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "A simple GNOME 3 application 
to access remote or virtual systems");
+                               gs_app_set_licence (app, "GPL-2.0+", GS_APP_QUALITY_NORMAL);
+                               gs_app_set_name (app, GS_APP_QUALITY_NORMAL,
+                                                "Boxes");
+                               gs_app_set_url (app, AS_URL_KIND_HOMEPAGE,
+                                               "http://www.gimp.org/";);
+                               gs_app_set_summary (app, GS_APP_QUALITY_NORMAL,
+                                                   "A simple GNOME 3 application "
+                                                   "to access remote or virtual systems");
+                               gs_app_set_description (app, GS_APP_QUALITY_NORMAL,
+                                                       "<p>long description!</p>");
                        }
                }
        }


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