forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opentelemetry-cpp-1.3.0-tests.patch
92 lines (89 loc) · 2.87 KB
/
opentelemetry-cpp-1.3.0-tests.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
diff --git a/ext/test/http/curl_http_test.cc b/ext/test/http/curl_http_test.cc
index f8d248b..9a5be49 100644
--- a/ext/test/http/curl_http_test.cc
+++ b/ext/test/http/curl_http_test.cc
@@ -187,50 +187,6 @@ TEST_F(BasicCurlHttpTests, HttpResponse)
ASSERT_EQ(count, 4);
}
-TEST_F(BasicCurlHttpTests, SendGetRequest)
-{
- received_requests_.clear();
- auto session_manager = http_client::HttpClientFactory::Create();
- EXPECT_TRUE(session_manager != nullptr);
-
- auto session = session_manager->CreateSession("http://127.0.0.1:19000");
- auto request = session->CreateRequest();
- request->SetUri("get/");
- GetEventHandler *handler = new GetEventHandler();
- session->SendRequest(*handler);
- ASSERT_TRUE(waitForRequests(30, 1));
- session->FinishSession();
- ASSERT_TRUE(handler->is_called_);
- delete handler;
-}
-
-TEST_F(BasicCurlHttpTests, SendPostRequest)
-{
- received_requests_.clear();
- auto session_manager = http_client::HttpClientFactory::Create();
- EXPECT_TRUE(session_manager != nullptr);
-
- auto session = session_manager->CreateSession("http://127.0.0.1:19000");
- auto request = session->CreateRequest();
- request->SetUri("post/");
- request->SetMethod(http_client::Method::Post);
-
- const char *b = "test-data";
- http_client::Body body = {b, b + strlen(b)};
- request->SetBody(body);
- request->AddHeader("Content-Type", "text/plain");
- PostEventHandler *handler = new PostEventHandler();
- session->SendRequest(*handler);
- ASSERT_TRUE(waitForRequests(30, 1));
- session->FinishSession();
- ASSERT_TRUE(handler->is_called_);
-
- session_manager->CancelAllSessions();
- session_manager->FinishAllSessions();
-
- delete handler;
-}
-
TEST_F(BasicCurlHttpTests, RequestTimeout)
{
received_requests_.clear();
@@ -271,17 +227,6 @@ TEST_F(BasicCurlHttpTests, CurlHttpOperations)
delete handler;
}
-TEST_F(BasicCurlHttpTests, SendGetRequestSync)
-{
- received_requests_.clear();
- curl::HttpClientSync http_client;
-
- http_client::Headers m1 = {};
- auto result = http_client.Get("http://127.0.0.1:19000/get/", m1);
- EXPECT_EQ(result, true);
- EXPECT_EQ(result.GetSessionState(), http_client::SessionState::Response);
-}
-
TEST_F(BasicCurlHttpTests, SendGetRequestSyncTimeout)
{
received_requests_.clear();
@@ -296,18 +241,6 @@ TEST_F(BasicCurlHttpTests, SendGetRequestSyncTimeout)
result.GetSessionState() == http_client::SessionState::SendFailed);
}
-TEST_F(BasicCurlHttpTests, SendPostRequestSync)
-{
- received_requests_.clear();
- curl::HttpClientSync http_client;
-
- http_client::Headers m1 = {};
- http_client::Body body = {};
- auto result = http_client.Post("http://127.0.0.1:19000/post/", body, m1);
- EXPECT_EQ(result, true);
- EXPECT_EQ(result.GetSessionState(), http_client::SessionState::Response);
-}
-
TEST_F(BasicCurlHttpTests, GetBaseUri)
{
curl::HttpClient session_manager;