Merge lp:~dobey/unity-scope-click/sign-all-vivid into lp:unity-scope-click/touch-15-04

Proposed by dobey
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 333
Merged at revision: 334
Proposed branch: lp:~dobey/unity-scope-click/sign-all-vivid
Merge into: lp:unity-scope-click/touch-15-04
Diff against target: 68 lines (+38/-2)
2 files modified
libclickscope/click/index.cpp (+2/-2)
libclickscope/tests/test_index.cpp (+36/-0)
To merge this branch: bzr merge lp:~dobey/unity-scope-click/sign-all-vivid
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+269969@code.launchpad.net

Commit message

Sign requests to CPI by default.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alejandro J. Cura (alecu) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libclickscope/click/index.cpp'
2--- libclickscope/click/index.cpp 2015-07-06 18:38:07 +0000
3+++ libclickscope/click/index.cpp 2015-09-02 19:06:31 +0000
4@@ -152,7 +152,7 @@
5 const std::string built_query(build_index_query(query, ""));
6 params.add(click::QUERY_ARGNAME, built_query.c_str());
7 QSharedPointer<click::web::Response> response(client->call(
8- get_base_url() + click::SEARCH_PATH, "GET", false, build_headers(), "", params));
9+ get_base_url() + click::SEARCH_PATH, "GET", true, build_headers(), "", params));
10
11 QObject::connect(response.data(), &click::web::Response::finished, [=](QString reply) {
12 std::pair<Packages, Packages> package_lists;
13@@ -179,7 +179,7 @@
14 {
15 click::web::CallParams params;
16 QSharedPointer<click::web::Response> response(client->call(
17- department_href, "GET", false, build_headers(), "", params));
18+ department_href, "GET", true, build_headers(), "", params));
19
20 QObject::connect(response.data(), &click::web::Response::finished, [=](QString reply) {
21 qDebug() << "departments request finished";
22
23=== modified file 'libclickscope/tests/test_index.cpp'
24--- libclickscope/tests/test_index.cpp 2014-08-11 18:30:00 +0000
25+++ libclickscope/tests/test_index.cpp 2015-09-02 19:06:31 +0000
26@@ -104,6 +104,42 @@
27 indexPtr->search("", [](click::Packages, click::Packages) {});
28 }
29
30+TEST_F(IndexTest, testSearchSignsCall)
31+{
32+ LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
33+ auto response = responseForReply(reply.asSharedPtr());
34+
35+ EXPECT_CALL(*clientPtr, callImpl(_, _, true, _, _, _))
36+ .Times(1)
37+ .WillOnce(Return(response));
38+
39+ indexPtr->search("", [](click::Packages, click::Packages) {});
40+}
41+
42+TEST_F(IndexTest, testBootstrapSignsCall)
43+{
44+ LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
45+ auto response = responseForReply(reply.asSharedPtr());
46+
47+ EXPECT_CALL(*clientPtr, callImpl(_, _, true, _, _, _))
48+ .Times(1)
49+ .WillOnce(Return(response));
50+
51+ indexPtr->bootstrap([](const click::DepartmentList&, const click::HighlightList&, click::Index::Error, int) {});
52+}
53+
54+TEST_F(IndexTest, testDepartmentsSignsCall)
55+{
56+ LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
57+ auto response = responseForReply(reply.asSharedPtr());
58+
59+ EXPECT_CALL(*clientPtr, callImpl(_, _, true, _, _, _))
60+ .Times(1)
61+ .WillOnce(Return(response));
62+
63+ indexPtr->departments("departments", [](const click::DepartmentList&, const click::HighlightList&, click::Index::Error, int) {});
64+}
65+
66 TEST_F(IndexTest, testSearchSendsBuiltQueryAsParam)
67 {
68 const std::string FAKE_BUILT_QUERY = "FAKE_QUERY,frameworks:fake-14.04,architecture:fake-arch";

Subscribers

People subscribed via source and target branches

to all changes: