[gnome-software/wip/async-plugin-repo-funcs: 32/32] lib: Skip repository related actions in gs_plugin_func() test




commit 5789284e8c9d618fc9b03999ceb17364a30c82fd
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 14 21:31:32 2022 +0200

    lib: Skip repository related actions in gs_plugin_func() test
    
    These do not have function, they exist only for better error messages.

 lib/gs-self-test.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/lib/gs-self-test.c b/lib/gs-self-test.c
index c98aca8aa..c38f452ea 100644
--- a/lib/gs-self-test.c
+++ b/lib/gs-self-test.c
@@ -219,8 +219,15 @@ gs_plugin_func (void)
        }
        for (guint i = 1; i < GS_PLUGIN_ACTION_LAST; i++) {
                const gchar *tmp = gs_plugin_action_to_function_name (i);
-               if (tmp == NULL)
+               if (tmp == NULL) {
+                       /* These do not have function, they exist only for better error messages. */
+                       if (i == GS_PLUGIN_ACTION_INSTALL_REPO ||
+                           i == GS_PLUGIN_ACTION_REMOVE_REPO ||
+                           i == GS_PLUGIN_ACTION_ENABLE_REPO ||
+                           i == GS_PLUGIN_ACTION_DISABLE_REPO)
+                               continue;
                        g_critical ("failed to convert %u", i);
+               }
        }
 
        /* add a couple of duplicate IDs */


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