[gnome-software/1290-dummy-plugin-s-key-colors-test-unreliable: 18/18] dummy: Correct the key-colors test




commit 9505e059bda2f283ec6223b0344572f1afc3c6c8
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jul 29 14:45:31 2021 +0200

    dummy: Correct the key-colors test
    
    There will never be more than 3 key colors returned, but there can
    be returned less colors.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1290

 plugins/dummy/gs-self-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/dummy/gs-self-test.c b/plugins/dummy/gs-self-test.c
index 92d054f1e..0bdf549ee 100644
--- a/plugins/dummy/gs-self-test.c
+++ b/plugins/dummy/gs-self-test.c
@@ -230,7 +230,8 @@ gs_plugins_dummy_key_colors_func (GsPluginLoader *plugin_loader)
        g_assert_no_error (error);
        g_assert (ret);
        array = gs_app_get_key_colors (app);
-       g_assert_cmpint (array->len, >=, 3);
+       g_assert_cmpint (array->len, <=, 3);
+       g_assert_cmpint (array->len, >, 0);
 
        /* check values are in range */
        for (i = 0; i < array->len; i++) {


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