[gnome-software] trivial: Use a consistent test name in all plugins
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Use a consistent test name in all plugins
- Date: Tue, 7 Mar 2017 17:06:15 +0000 (UTC)
commit 01d3f91abcfc8e28fb4e56449836abda46f2c4cb
Author: Richard Hughes <richard hughsie com>
Date: Tue Mar 7 16:56:14 2017 +0000
trivial: Use a consistent test name in all plugins
lib/gs-self-test.c | 20 +++++-----
plugins/dpkg/gs-self-test.c | 6 ++--
plugins/dummy/gs-self-test.c | 72 ++++++++++++++++++------------------
plugins/epiphany/gs-self-test.c | 6 ++--
plugins/flatpak/gs-self-test.c | 45 +++++++++++------------
plugins/fwupd/gs-self-test.c | 6 ++--
plugins/modalias/gs-self-test.c | 6 ++--
plugins/packagekit/gs-self-test.c | 6 ++--
plugins/repos/gs-self-test.c | 6 ++--
9 files changed, 85 insertions(+), 88 deletions(-)
---
diff --git a/lib/gs-self-test.c b/lib/gs-self-test.c
index 005a014..8c8e7be 100644
--- a/lib/gs-self-test.c
+++ b/lib/gs-self-test.c
@@ -480,16 +480,16 @@ main (int argc, char **argv)
g_log_set_fatal_mask (NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
/* tests go here */
- g_test_add_func ("/gnome-software/utils{url}", gs_utils_url_func);
- g_test_add_func ("/gnome-software/utils{wilson}", gs_utils_wilson_func);
- g_test_add_func ("/gnome-software/utils{error}", gs_utils_error_func);
- g_test_add_func ("/gnome-software/os-release", gs_os_release_func);
- g_test_add_func ("/gnome-software/app", gs_app_func);
- g_test_add_func ("/gnome-software/app{unique-id}", gs_app_unique_id_func);
- g_test_add_func ("/gnome-software/app{thread}", gs_app_thread_func);
- g_test_add_func ("/gnome-software/plugin", gs_plugin_func);
- g_test_add_func ("/gnome-software/plugin{global-cache}", gs_plugin_global_cache_func);
- g_test_add_func ("/gnome-software/auth{secret}", gs_auth_secret_func);
+ g_test_add_func ("/gnome-software/lib/utils{url}", gs_utils_url_func);
+ g_test_add_func ("/gnome-software/lib/utils{wilson}", gs_utils_wilson_func);
+ g_test_add_func ("/gnome-software/lib/utils{error}", gs_utils_error_func);
+ g_test_add_func ("/gnome-software/lib/os-release", gs_os_release_func);
+ g_test_add_func ("/gnome-software/lib/app", gs_app_func);
+ g_test_add_func ("/gnome-software/lib/app{unique-id}", gs_app_unique_id_func);
+ g_test_add_func ("/gnome-software/lib/app{thread}", gs_app_thread_func);
+ g_test_add_func ("/gnome-software/lib/plugin", gs_plugin_func);
+ g_test_add_func ("/gnome-software/lib/plugin{global-cache}", gs_plugin_global_cache_func);
+ g_test_add_func ("/gnome-software/lib/auth{secret}", gs_auth_secret_func);
return g_test_run ();
}
diff --git a/plugins/dpkg/gs-self-test.c b/plugins/dpkg/gs-self-test.c
index e979d7a..f4eef98 100644
--- a/plugins/dpkg/gs-self-test.c
+++ b/plugins/dpkg/gs-self-test.c
@@ -26,7 +26,7 @@
#include "gs-test.h"
static void
-gs_plugin_loader_dpkg_func (GsPluginLoader *plugin_loader)
+gs_plugins_dpkg_func (GsPluginLoader *plugin_loader)
{
g_autoptr(GsApp) app = NULL;
g_autoptr(GError) error = NULL;
@@ -93,9 +93,9 @@ main (int argc, char **argv)
g_assert (ret);
/* plugin tests go here */
- g_test_add_data_func ("/gnome-software/plugin-loader{dpkg}",
+ g_test_add_data_func ("/gnome-software/plugins/dpkg",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_dpkg_func);
+ (GTestDataFunc) gs_plugins_dpkg_func);
return g_test_run ();
}
diff --git a/plugins/dummy/gs-self-test.c b/plugins/dummy/gs-self-test.c
index 0b05e44..184508d 100644
--- a/plugins/dummy/gs-self-test.c
+++ b/plugins/dummy/gs-self-test.c
@@ -37,7 +37,7 @@ gs_plugin_loader_status_changed_cb (GsPluginLoader *plugin_loader,
}
static void
-gs_plugin_loader_install_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_install_func (GsPluginLoader *plugin_loader)
{
gboolean ret;
g_autoptr(GsApp) app = NULL;
@@ -70,7 +70,7 @@ gs_plugin_loader_install_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_error_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_error_func (GsPluginLoader *plugin_loader)
{
GsPluginEvent *event;
const GError *app_error;
@@ -120,7 +120,7 @@ gs_plugin_loader_error_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_refine_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_refine_func (GsPluginLoader *plugin_loader)
{
gboolean ret;
g_autoptr(GsApp) app = NULL;
@@ -146,7 +146,7 @@ gs_plugin_loader_refine_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_key_colors_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_key_colors_func (GsPluginLoader *plugin_loader)
{
GPtrArray *array;
gboolean ret;
@@ -182,7 +182,7 @@ gs_plugin_loader_key_colors_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_updates_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_updates_func (GsPluginLoader *plugin_loader)
{
GsApp *app;
g_autoptr(GError) error = NULL;
@@ -226,7 +226,7 @@ gs_plugin_loader_updates_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_distro_upgrades_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_distro_upgrades_func (GsPluginLoader *plugin_loader)
{
GsApp *app;
gboolean ret;
@@ -279,7 +279,7 @@ gs_plugin_loader_distro_upgrades_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_installed_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_installed_func (GsPluginLoader *plugin_loader)
{
GsApp *app;
GsApp *addon;
@@ -346,7 +346,7 @@ gs_plugin_loader_installed_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_search_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_search_func (GsPluginLoader *plugin_loader)
{
GsApp *app;
g_autofree gchar *menu_path = NULL;
@@ -372,7 +372,7 @@ gs_plugin_loader_search_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_url_to_app_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_url_to_app_func (GsPluginLoader *plugin_loader)
{
g_autoptr(GError) error = NULL;
g_autoptr(GsApp) app = NULL;
@@ -446,7 +446,7 @@ gs_plugin_loader_webapps_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_plugin_cache_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_plugin_cache_func (GsPluginLoader *plugin_loader)
{
GsApp *app1;
GsApp *app2;
@@ -483,7 +483,7 @@ gs_plugin_loader_plugin_cache_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_authentication_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_authentication_func (GsPluginLoader *plugin_loader)
{
GsAuth *auth;
gboolean ret;
@@ -555,7 +555,7 @@ gs_plugin_loader_authentication_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_wildcard_func (GsPluginLoader *plugin_loader)
+gs_plugins_dummy_wildcard_func (GsPluginLoader *plugin_loader)
{
g_autoptr(GError) error = NULL;
g_autoptr(GsAppList) list = NULL;
@@ -672,42 +672,42 @@ main (int argc, char **argv)
g_assert (gs_plugin_loader_get_enabled (plugin_loader, "dummy"));
/* plugin tests go here */
- g_test_add_data_func ("/gnome-software/plugin-loader{wildcard}",
+ g_test_add_data_func ("/gnome-software/plugins/dummy/wildcard",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_wildcard_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{authentication}",
+ (GTestDataFunc) gs_plugins_dummy_wildcard_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/authentication",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_authentication_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{plugin-cache}",
+ (GTestDataFunc) gs_plugins_dummy_authentication_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/plugin-cache",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_plugin_cache_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{key-colors}",
+ (GTestDataFunc) gs_plugins_dummy_plugin_cache_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/key-colors",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_key_colors_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{search}",
+ (GTestDataFunc) gs_plugins_dummy_key_colors_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/search",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_search_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{url-to-app}",
+ (GTestDataFunc) gs_plugins_dummy_search_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/url-to-app",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_url_to_app_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{install}",
+ (GTestDataFunc) gs_plugins_dummy_url_to_app_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/install",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_install_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{error}",
+ (GTestDataFunc) gs_plugins_dummy_install_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/error",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_error_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{installed}",
+ (GTestDataFunc) gs_plugins_dummy_error_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/installed",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_installed_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{refine}",
+ (GTestDataFunc) gs_plugins_dummy_installed_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/refine",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_refine_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{updates}",
+ (GTestDataFunc) gs_plugins_dummy_refine_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/updates",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_updates_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{distro-upgrades}",
+ (GTestDataFunc) gs_plugins_dummy_updates_func);
+ g_test_add_data_func ("/gnome-software/plugins/dummy/distro-upgrades",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_distro_upgrades_func);
+ (GTestDataFunc) gs_plugins_dummy_distro_upgrades_func);
return g_test_run ();
}
diff --git a/plugins/epiphany/gs-self-test.c b/plugins/epiphany/gs-self-test.c
index 98f9269..68c5e77 100644
--- a/plugins/epiphany/gs-self-test.c
+++ b/plugins/epiphany/gs-self-test.c
@@ -26,7 +26,7 @@
#include "gs-test.h"
static void
-gs_plugin_loader_webapps_func (GsPluginLoader *plugin_loader)
+gs_plugins_epiphany_func (GsPluginLoader *plugin_loader)
{
gboolean ret;
g_autoptr(GError) error = NULL;
@@ -99,9 +99,9 @@ main (int argc, char **argv)
g_assert (ret);
/* plugin tests go here */
- g_test_add_data_func ("/gnome-software/plugin-loader{webapps}",
+ g_test_add_data_func ("/gnome-software/plugins/epiphany",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_webapps_func);
+ (GTestDataFunc) gs_plugins_epiphany_func);
return g_test_run ();
}
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index 0506934..5b2b53b 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -26,7 +26,7 @@
#include "gs-test.h"
static void
-gs_plugin_loader_flatpak_repo_func (GsPluginLoader *plugin_loader)
+gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
{
const gchar *group_name = "remote \"example\"";
const gchar *root = NULL;
@@ -146,7 +146,7 @@ gs_plugin_loader_flatpak_repo_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
+gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
{
GsApp *app;
GsApp *runtime;
@@ -410,7 +410,7 @@ gs_plugin_loader_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
+gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
{
GsApp *app;
gboolean ret;
@@ -552,7 +552,7 @@ update_app_action_finish_sync (GObject *source, GAsyncResult *res, gpointer user
}
static void
-gs_plugin_loader_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
+gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
{
GsApp *app_source;
GsApp *runtime;
@@ -706,7 +706,7 @@ gs_plugin_loader_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_flatpak_ref_func (GsPluginLoader *plugin_loader)
+gs_plugins_flatpak_ref_func (GsPluginLoader *plugin_loader)
{
GsApp *runtime;
gboolean ret;
@@ -887,14 +887,14 @@ gs_plugin_loader_flatpak_ref_func (GsPluginLoader *plugin_loader)
}
static void
-gs_plugin_loader_flatpak_count_signal_cb (GsPluginLoader *plugin_loader, guint *cnt)
+gs_plugins_flatpak_count_signal_cb (GsPluginLoader *plugin_loader, guint *cnt)
{
if (cnt != NULL)
(*cnt)++;
}
static void
-gs_plugin_loader_flatpak_app_update_func (GsPluginLoader *plugin_loader)
+gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
{
GsApp *app;
GsApp *app_tmp;
@@ -1043,11 +1043,11 @@ gs_plugin_loader_flatpak_app_update_func (GsPluginLoader *plugin_loader)
/* care about signals */
pending_apps_changed_id =
g_signal_connect (plugin_loader, "pending-apps-changed",
- G_CALLBACK (gs_plugin_loader_flatpak_count_signal_cb),
+ G_CALLBACK (gs_plugins_flatpak_count_signal_cb),
&pending_app_changed_cnt);
updates_changed_id =
g_signal_connect (plugin_loader, "updates-changed",
- G_CALLBACK (gs_plugin_loader_flatpak_count_signal_cb),
+ G_CALLBACK (gs_plugins_flatpak_count_signal_cb),
&updates_changed_cnt);
notify_state_id =
g_signal_connect (app, "notify::state",
@@ -1174,27 +1174,24 @@ main (int argc, char **argv)
g_assert (ret);
/* plugin tests go here */
- g_test_add_data_func ("/gnome-software/plugin-loader{flatpak-app-with-runtime}",
+ g_test_add_data_func ("/gnome-software/plugins/flatpak/app-with-runtime",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_flatpak_app_with_runtime_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{flatpak-app-missing-runtime}",
+ (GTestDataFunc) gs_plugins_flatpak_app_with_runtime_func);
+ g_test_add_data_func ("/gnome-software/plugins/flatpak/app-missing-runtime",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_flatpak_app_missing_runtime_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{flatpak-ref}",
+ (GTestDataFunc) gs_plugins_flatpak_app_missing_runtime_func);
+ g_test_add_data_func ("/gnome-software/plugins/flatpak/ref",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_flatpak_ref_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{flatpak-runtime-repo}",
+ (GTestDataFunc) gs_plugins_flatpak_ref_func);
+ g_test_add_data_func ("/gnome-software/plugins/flatpak/runtime-repo",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_flatpak_runtime_repo_func);
- g_test_add_data_func ("/gnome-software/plugin-loader{flatpak-app-update-runtime}",
+ (GTestDataFunc) gs_plugins_flatpak_runtime_repo_func);
+ g_test_add_data_func ("/gnome-software/plugins/flatpak/app-update-runtime",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_flatpak_app_update_func);
-
- /* done last as it would otherwise try to do downloading in other
- * gs_plugin_file_to_app()-using tests */
- g_test_add_data_func ("/gnome-software/plugin-loader{flatpak:repo}",
+ (GTestDataFunc) gs_plugins_flatpak_app_update_func);
+ g_test_add_data_func ("/gnome-software/plugins/flatpak/repo",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_flatpak_repo_func);
+ (GTestDataFunc) gs_plugins_flatpak_repo_func);
return g_test_run ();
}
diff --git a/plugins/fwupd/gs-self-test.c b/plugins/fwupd/gs-self-test.c
index 85109f8..0405671 100644
--- a/plugins/fwupd/gs-self-test.c
+++ b/plugins/fwupd/gs-self-test.c
@@ -26,7 +26,7 @@
#include "gs-test.h"
static void
-gs_plugin_loader_fwupd_func (GsPluginLoader *plugin_loader)
+gs_plugins_fwupd_func (GsPluginLoader *plugin_loader)
{
g_autofree gchar *fn = NULL;
g_autoptr(GError) error = NULL;
@@ -101,9 +101,9 @@ main (int argc, char **argv)
g_assert (ret);
/* plugin tests go here */
- g_test_add_data_func ("/gnome-software/plugin-loader{fwupd}",
+ g_test_add_data_func ("/gnome-software/plugins/fwupd",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_fwupd_func);
+ (GTestDataFunc) gs_plugins_fwupd_func);
return g_test_run ();
}
diff --git a/plugins/modalias/gs-self-test.c b/plugins/modalias/gs-self-test.c
index d3408a8..590b7c5 100644
--- a/plugins/modalias/gs-self-test.c
+++ b/plugins/modalias/gs-self-test.c
@@ -26,7 +26,7 @@
#include "gs-test.h"
static void
-gs_plugin_loader_modalias_func (GsPluginLoader *plugin_loader)
+gs_plugins_modalias_func (GsPluginLoader *plugin_loader)
{
GsApp *app;
g_autofree gchar *menu_path = NULL;
@@ -99,9 +99,9 @@ main (int argc, char **argv)
g_assert (ret);
/* plugin tests go here */
- g_test_add_data_func ("/gnome-software/plugin-loader{modalias}",
+ g_test_add_data_func ("/gnome-software/plugins/modalias",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_modalias_func);
+ (GTestDataFunc) gs_plugins_modalias_func);
return g_test_run ();
}
diff --git a/plugins/packagekit/gs-self-test.c b/plugins/packagekit/gs-self-test.c
index 865229f..f7ca39e 100644
--- a/plugins/packagekit/gs-self-test.c
+++ b/plugins/packagekit/gs-self-test.c
@@ -207,7 +207,7 @@ gs_markdown_func (void)
}
static void
-gs_plugin_loader_packagekit_local_func (GsPluginLoader *plugin_loader)
+gs_plugins_packagekit_local_func (GsPluginLoader *plugin_loader)
{
g_autoptr(GsApp) app = NULL;
g_autoptr(GError) error = NULL;
@@ -276,9 +276,9 @@ main (int argc, char **argv)
g_assert (ret);
/* plugin tests go here */
- g_test_add_data_func ("/gnome-software/plugin-loader{packagekit-local}",
+ g_test_add_data_func ("/gnome-software/plugins/packagekit/local",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_packagekit_local_func);
+ (GTestDataFunc) gs_plugins_packagekit_local_func);
return g_test_run ();
}
diff --git a/plugins/repos/gs-self-test.c b/plugins/repos/gs-self-test.c
index 7f19d8a..9265c2c 100644
--- a/plugins/repos/gs-self-test.c
+++ b/plugins/repos/gs-self-test.c
@@ -26,7 +26,7 @@
#include "gs-test.h"
static void
-gs_plugin_loader_repos_func (GsPluginLoader *plugin_loader)
+gs_plugins_repos_func (GsPluginLoader *plugin_loader)
{
gboolean ret;
g_autoptr(GsApp) app = NULL;
@@ -82,9 +82,9 @@ main (int argc, char **argv)
g_assert (ret);
/* plugin tests go here */
- g_test_add_data_func ("/gnome-software/plugin-loader{repos}",
+ g_test_add_data_func ("/gnome-software/plugins/repos",
plugin_loader,
- (GTestDataFunc) gs_plugin_loader_repos_func);
+ (GTestDataFunc) gs_plugins_repos_func);
return g_test_run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]