diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2014-11-02 20:45:23 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2014-11-02 20:45:23 +0100 |
commit | d8d094ddbe0fb9ab86ecd33f6cdd056d8b1ce9f2 (patch) | |
tree | a5c9a598350664e0734fd145e7a0db5d35875caf /tests | |
parent | b9ad4d789d0ed95cda227e753a7927ad9a4340cc (diff) | |
download | remote-logon-service-d8d094ddbe0fb9ab86ecd33f6cdd056d8b1ce9f2.tar.gz remote-logon-service-d8d094ddbe0fb9ab86ecd33f6cdd056d8b1ce9f2.tar.bz2 remote-logon-service-d8d094ddbe0fb9ab86ecd33f6cdd056d8b1ce9f2.zip |
upload to ppa:x2go/stable+ppa (ubuntu/1.0.0-0ubuntu3+x2go1~0ubuntu14.04.1)
* Non-maintainer upload.
* Add SERVER_NAME env var support.
* Add X2Go support to RLS.
* Provide via ppa:x2go/ppa and ppa:x2go/stable on Launchpad.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dbus-interface.c | 5 | ||||
-rw-r--r-- | tests/server-test.c | 2 | ||||
-rwxr-xr-x | tests/slmock | 15 |
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/dbus-interface.c b/tests/dbus-interface.c index 28ce314..2427b34 100644 --- a/tests/dbus-interface.c +++ b/tests/dbus-interface.c @@ -184,9 +184,12 @@ slmock_check_login(GDBusConnection * session, slmock_table_t * slmockdata, gbool GVariant * array = g_variant_get_child_value(retval, 2); int i; + // Check all servers should be in the result are in the result for (i = 0; slmockdata->servers[i].name != NULL; i++) { g_assert(find_server(array, &slmockdata->servers[i])); } + // Check there is no more servers in the result than we expected + g_assert(i == g_variant_n_children(array)); g_variant_unref(array); g_variant_unref(retval); @@ -568,7 +571,9 @@ test_dbus_suite (void) gint main (gint argc, gchar * argv[]) { +#if !GLIB_CHECK_VERSION (2, 35, 1) g_type_init(); +#endif g_test_init(&argc, &argv, NULL); /* Test suites */ diff --git a/tests/server-test.c b/tests/server-test.c index 32299af..06b6233 100644 --- a/tests/server-test.c +++ b/tests/server-test.c @@ -270,7 +270,9 @@ test_objects_suite (void) gint main (gint argc, gchar * argv[]) { +#if !GLIB_CHECK_VERSION (2, 35, 1) g_type_init(); +#endif g_test_init(&argc, &argv, NULL); /* Test suites */ diff --git a/tests/slmock b/tests/slmock index 59c5174..b3b5019 100755 --- a/tests/slmock +++ b/tests/slmock @@ -78,6 +78,20 @@ def freerdp(email): ms.set_default(ts1.Name) print(ms.toJson()) +def x2go(email): + ms = ManagementServer("http://x2go.intern", "X2GoSessionBroker") + ts1 = TerminalServer("10.0.2.11", "X2Go Server 1", "x2go", False, + "foo") + ts2 = TerminalServer("10.0.2.12", "X2Go Server 2", "x2go", False, + "bar") + ts3 = TerminalServer("10.0.2.13", "X2Go Server 3", "x2go", False, + "foobar") + ms.add_terminal_server(ts1) + ms.add_terminal_server(ts2) + ms.add_terminal_server(ts3) + ms.set_default(ts1.Name) + print(ms.toJson()) + def print_error(text): print("{ \"Error\": \"%s\" }" % text) @@ -201,6 +215,7 @@ emailaddrs = {"b" : big, #lots of domains/servers "d" : defaults, #for easy testing of default ts "e" : error, "f" : freerdp, + "x" : x2go, "g" : garbage, "m" : missing_fields, #json missing some fields "r" : random_string, |