summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2015-09-04 15:13:24 +0200
committerDebarshi Ray <debarshir@gnome.org>2018-08-13 17:47:29 +0200
commit92d0909da69c19d1fabc41aee199a5cc2b0279cb (patch)
treeebc356677fc3f1221a06a9e8658dbfd8aeeba95f
parentcffa2ce8cfd12437ab7861bb3335b571f9e1a983 (diff)
downloadlibgdata-92d0909da69c19d1fabc41aee199a5cc2b0279cb.tar.gz
Port the tests
https://bugzilla.gnome.org/show_bug.cgi?id=684920
-rw-r--r--gdata/tests/Makefile.am5
-rw-r--r--gdata/tests/documents.c12
2 files changed, 8 insertions, 9 deletions
diff --git a/gdata/tests/Makefile.am b/gdata/tests/Makefile.am
index d5a1de5c..b72e8217 100644
--- a/gdata/tests/Makefile.am
+++ b/gdata/tests/Makefile.am
@@ -51,6 +51,7 @@ test_programs = \
general \
calendar \
contacts \
+ documents \
tasks \
perf \
authorization \
@@ -60,10 +61,6 @@ test_programs = \
youtube \
$(NULL)
-# FIXME: Temporarily disabled until they are ported for the changes in the v2
-# to v3 API transitions.
-#all_test_programs += documents
-
# PicasaWeb does not work since Google made the API read-only:
# https://developers.google.com/picasa-web/docs/3.0/releasenotes#picasa-is-retiring-february-12-2016
#all_test_programs += picasaweb
diff --git a/gdata/tests/documents.c b/gdata/tests/documents.c
index b7fe19df..0371496d 100644
--- a/gdata/tests/documents.c
+++ b/gdata/tests/documents.c
@@ -275,6 +275,7 @@ _set_up_temp_document (GDataDocumentsEntry *entry, GDataService *service, GFile
/* Finish the upload */
document = gdata_documents_service_finish_upload (GDATA_DOCUMENTS_SERVICE (service), upload_stream, &error);
g_assert_no_error (error);
+ g_assert (GDATA_IS_DOCUMENTS_DOCUMENT (document));
g_object_unref (upload_stream);
@@ -1173,7 +1174,7 @@ test_copy_document (TempCopyDocumentData *data, gconstpointer service)
/* Copy the document */
data->new_document = gdata_documents_service_copy_document (GDATA_DOCUMENTS_SERVICE (service), data->parent.document, NULL, &error);
g_assert_no_error (error);
- g_assert (GDATA_IS_DOCUMENTS_SPREADSHEET (data->new_document));
+ g_assert (GDATA_IS_DOCUMENTS_DOCUMENT (data->new_document));
/* Check their IDs are different but that their other properties (e.g. title) are the same. */
g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (data->parent.document)), !=, gdata_entry_get_id (GDATA_ENTRY (data->new_document)));
@@ -2051,6 +2052,7 @@ mock_server_notify_resolver_cb (GObject *object, GParamSpec *pspec, gpointer use
uhm_resolver_add_A (resolver, "lh3.googleusercontent.com", ip_address);
uhm_resolver_add_A (resolver, "lh5.googleusercontent.com", ip_address);
uhm_resolver_add_A (resolver, "lh6.googleusercontent.com", ip_address);
+ uhm_resolver_add_A (resolver, "www.googleapis.com", ip_address);
}
}
@@ -2259,10 +2261,10 @@ main (int argc, char *argv[])
set_up_folders_remove_from_folder_async, test_folders_remove_from_folder_async_cancellation,
tear_down_folders_remove_from_folder_async);
- g_test_add_data_func ("/documents/batch", service, test_batch);
- g_test_add ("/documents/batch/async", BatchAsyncData, service, set_up_batch_async, test_batch_async, tear_down_batch_async);
- g_test_add ("/documents/batch/async/cancellation", BatchAsyncData, service, set_up_batch_async, test_batch_async_cancellation,
- tear_down_batch_async);
+ /* g_test_add_data_func ("/documents/batch", service, test_batch); */
+ /* g_test_add ("/documents/batch/async", BatchAsyncData, service, set_up_batch_async, test_batch_async, tear_down_batch_async); */
+ /* g_test_add ("/documents/batch/async/cancellation", BatchAsyncData, service, set_up_batch_async, test_batch_async_cancellation, */
+ /* tear_down_batch_async); */
g_test_add_func ("/documents/folder/parser/normal", test_folder_parser_normal);
g_test_add_func ("/documents/query/etag", test_query_etag);