From abfa659d168aa835502145c26578a8ef4268d047 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Tue, 9 May 2023 08:58:51 +0200 Subject: [PATCH] test-application: Use dummy plugin The test should not try communicating with any modem through ModemManager. Fixes: #576 (cherry picked from commit e26e6640d84868b36bbdbe44e255c4eccc8469de) --- tests/test-application.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test-application.c b/tests/test-application.c index 92bd91c..2202ee1 100644 --- a/tests/test-application.c +++ b/tests/test-application.c @@ -26,12 +26,12 @@ static void test_application_shutdown_daemon (void) { CallsApplication *app = calls_application_new (); - char *argv[] = { "test", "--daemon", NULL }; + char *argv[] = { "test", "--daemon", "-p", "dummy", NULL }; int status; g_idle_add (on_idle_quit, app); - status = g_application_run (G_APPLICATION (app), 3, argv); + status = g_application_run (G_APPLICATION (app), G_N_ELEMENTS (argv), argv); g_assert_cmpint (status, ==, 0); g_assert_finalize_object (app); @@ -42,11 +42,12 @@ static void test_application_shutdown_no_daemon (void) { CallsApplication *app = calls_application_new (); + char *argv[] = { "test", "-p", "dummy", NULL }; int status; g_idle_add (on_idle_quit, app); - status = g_application_run (G_APPLICATION (app), 0, NULL); + status = g_application_run (G_APPLICATION (app), G_N_ELEMENTS (argv), argv); g_assert_cmpint (status, ==, 0); g_assert_finalize_object (app); @@ -57,11 +58,12 @@ static void test_application_shutdown_delayed (void) { CallsApplication *app = calls_application_new (); + char *argv[] = { "test", "-p", "dummy", NULL }; int status; g_timeout_add_seconds (5, on_idle_quit, app); - status = g_application_run (G_APPLICATION (app), 0, NULL); + status = g_application_run (G_APPLICATION (app), G_N_ELEMENTS (argv), argv); g_assert_cmpint (status, ==, 0); g_assert_finalize_object (app);