// Attempt to read the caldavtest-timeout.auth file.
- DataFileResult = ProcessConnectionDataFile("caldavtest-fail.auth", &ConnTimeout);
+ DataFileResult = ProcessConnectionDataFile("caldavtest-timeout.auth", &ConnTimeout);
if (DataFileResult == PROCESSCONNECTIONDATAFILE_OK){
ValidDataTimeout = true;
}
// (*nix version) Setup an inital connection on a server where
// a timeout occurs.
+ CalDAV CalDAVTimeout;
+ CalDAVTimeout.SetupConnectionData(&ConnTimeout);
+
+ // Verify that the settings match with the CalDAVConnectionData
+ // passed.
+
+ CalDAVStatus CalDAVTimeoutStatus = CalDAVTimeout.GetConnectionData();
+
+ ASSERT_EQ(CalDAVTimeoutStatus.Hostname, ConnTimeout.Hostname);
+ ASSERT_EQ(CalDAVTimeoutStatus.Username, ConnTimeout.Username);
+ ASSERT_EQ(CalDAVTimeoutStatus.Port, ConnTimeout.Port);
+ ASSERT_EQ(CalDAVTimeoutStatus.Prefix, ConnTimeout.Prefix);
+ ASSERT_EQ(CalDAVTimeoutStatus.UseSSL, ConnTimeout.UseSSL);
+
// Verify that the connection had timed out.
+ ConnResult = CalDAVTimeout.Connect();
+
+ ASSERT_EQ(CALDAVQUERYRESULT_SERVERERROR, ConnResult.Result);
+ ASSERT_EQ(0, ConnResult.HTTPCode);
+ ASSERT_EQ(CURLE_OPERATION_TIMEDOUT, ConnResult.Code);
+
}
\ No newline at end of file