[glib-networking/wip/nacho/fix-libsoup-loop] connection: fix unit test to assert an error



commit ac7a03c7cd2f0ef95d5104f3e7a3f4a4132bcebb
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date:   Fri Mar 13 13:54:19 2020 +0100

    connection: fix unit test to assert an error

 tls/tests/connection.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index 21a150a..4113f9e 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -966,8 +966,8 @@ test_invalid_chain_with_alternative_ca_cert (TestConnection *test,
 #ifdef BACKEND_IS_GNUTLS
   g_assert_error (test->server_error, G_TLS_ERROR, G_TLS_ERROR_NOT_TLS);
 #elif defined(BACKEND_IS_OPENSSL)
-  /* FIXME: This is not OK. There should be an error here. */
-  g_assert_no_error (test->server_error);
+  /* FIXME: This is not OK. There should be a NOT_TLS errors. */
+  g_assert_error (test->server_error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE);
 #endif
 }
 
@@ -1466,8 +1466,8 @@ test_failed_connection (TestConnection *test,
 #ifdef BACKEND_IS_GNUTLS
   g_assert_error (test->server_error, G_TLS_ERROR, G_TLS_ERROR_NOT_TLS);
 #elif defined(BACKEND_IS_OPENSSL)
-  /* FIXME: This is not OK. There should be an error here. */
-  g_assert_no_error (test->server_error);
+  /* FIXME: This is not OK. There should be a NOT_TLS error here. */
+  g_assert_error (test->server_error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE);
 #endif
 }
 


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