PageRenderTime 31ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/test/credsCommons/parser/Parser.cpp

https://gitlab.com/admin-github-cloud/cynara
C++ | 402 lines | 340 code | 31 blank | 31 comment | 4 complexity | f781e945b6f49f2e4e26719875f8cec9 MD5 | raw file
  1. /*
  2. * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /**
  17. * @file test/credsCommons/parser/Parser.cpp
  18. * @author Radoslaw Bartosiak <r.bartosiak@samsung.com>
  19. * @version 1.1
  20. * @brief Tests of internal implementation of credential commons functions
  21. */
  22. #include <exception>
  23. #include <fstream>
  24. #include <gmock/gmock.h>
  25. #include <gtest/gtest.h>
  26. #include <iostream>
  27. #include <sstream>
  28. #include "FakeCredsCommonsInnerBackend.h"
  29. #include <cynara-creds-commons.h>
  30. #include <CredsCommonsInner.h>
  31. /* Tests */
  32. using namespace Cynara;
  33. using ::testing::_;
  34. using ::testing::Assign;
  35. using ::testing::AtMost;
  36. using ::testing::Eq;
  37. using ::testing::Between;
  38. using ::testing::DoAll;
  39. using ::testing::Return;
  40. using ::testing::SetArgReferee;
  41. using ::testing::Throw;
  42. #define NOT_A_METHOD_CODE -13197 //number which is not a method code
  43. /*** Test for getKeyAndValue() ***/
  44. struct getKeyAndValueTestEntry {
  45. std::string testString;
  46. std::locale loc;
  47. bool expectedResult;
  48. std::string key;
  49. std::string value;
  50. };
  51. TEST(parser, getKeyAndValue) {
  52. static std::vector<struct getKeyAndValueTestEntry> getKeyAndValueTestEntries;
  53. // test cases initialization key and value are checked only if expectedResult is true
  54. getKeyAndValueTestEntries.push_back({"", std::locale::classic(), false, "", ""});
  55. getKeyAndValueTestEntries.push_back({"#", std::locale::classic(), false, "", ""});
  56. getKeyAndValueTestEntries.push_back({"a", std::locale::classic(), false, "", ""});
  57. getKeyAndValueTestEntries.push_back({"=", std::locale::classic(), false, "", ""});
  58. getKeyAndValueTestEntries.push_back({"\n", std::locale::classic(), false, "", ""});
  59. getKeyAndValueTestEntries.push_back({"aa", std::locale::classic(), false, "", ""});
  60. getKeyAndValueTestEntries.push_back({"=#", std::locale::classic(), false, "", ""});
  61. getKeyAndValueTestEntries.push_back({"=\n", std::locale::classic(), false, "", ""});
  62. getKeyAndValueTestEntries.push_back({"\n=", std::locale::classic(), false, "", ""});
  63. getKeyAndValueTestEntries.push_back({"==", std::locale::classic(), false, "", "="});
  64. getKeyAndValueTestEntries.push_back({"#=", std::locale::classic(), false, "", ""});
  65. getKeyAndValueTestEntries.push_back({"aa", std::locale::classic(), false, "", ""});
  66. getKeyAndValueTestEntries.push_back({"##", std::locale::classic(), false, "", ""});
  67. getKeyAndValueTestEntries.push_back({"a=b", std::locale::classic(), true, "a", "b"});
  68. getKeyAndValueTestEntries.push_back({"=aa", std::locale::classic(), false, "", "aa"});
  69. getKeyAndValueTestEntries.push_back({"aa=", std::locale::classic(), true, "aa", ""});
  70. getKeyAndValueTestEntries.push_back({"#a=", std::locale::classic(), false, "", ""});
  71. getKeyAndValueTestEntries.push_back({"a=#", std::locale::classic(), true, "a", ""});
  72. getKeyAndValueTestEntries.push_back({"=#a", std::locale::classic(), false, "", ""});
  73. getKeyAndValueTestEntries.push_back({"==a", std::locale::classic(), false, "", ""});
  74. getKeyAndValueTestEntries.push_back({"=a=", std::locale::classic(), false, "", ""});
  75. getKeyAndValueTestEntries.push_back({"a=#\nb", std::locale::classic(), true, "a", ""});
  76. getKeyAndValueTestEntries.push_back({"a=#b\n", std::locale::classic(), true, "a", ""});
  77. getKeyAndValueTestEntries.push_back({"a\nb", std::locale::classic(), false, "", ""});
  78. getKeyAndValueTestEntries.push_back({"\na=b", std::locale::classic(), true, "a", "b"});
  79. getKeyAndValueTestEntries.push_back({"a=#\nb", std::locale::classic(), true, "a", ""});
  80. getKeyAndValueTestEntries.push_back({"=a\nb", std::locale::classic(), false, "", ""});
  81. getKeyAndValueTestEntries.push_back({"a=\nb=c#", std::locale::classic(), true, "a", ""});
  82. getKeyAndValueTestEntries.push_back({"=a\nb=c#", std::locale::classic(), true, "b", "c"});
  83. getKeyAndValueTestEntries.push_back({"aa\nkey=value", std::locale::classic(), true, "key",
  84. "value"});
  85. getKeyAndValueTestEntries.push_back({" key with spaces = value with spaces #\n",
  86. std::locale::classic(), true, "key with spaces",
  87. "value with spaces"});
  88. getKeyAndValueTestEntries.push_back({"VeryLongKey1111111111111111111111111111111111111111111"
  89. "111111111111111111111111111111111111111111111111111111"
  90. "111111111 = 1\nnoImportant", std::locale::classic(),
  91. true,
  92. "verylongkey1111111111111111111111111111111111111111111"
  93. "111111111111111111111111111111111111111111111111111111"
  94. "111111111", "1"});
  95. getKeyAndValueTestEntries.push_back({"key=value", std::locale::classic(), true, "key",
  96. "value"});
  97. getKeyAndValueTestEntries.push_back({"CAPSON=CaPSon", std::locale::classic(), true,
  98. "capson", "capson"});
  99. getKeyAndValueTestEntries.push_back({" soMe_spacEs_ = vaLue# ", std::locale::classic(),
  100. true, "some_spaces_", "value"});
  101. int i = 0;
  102. for (auto it = getKeyAndValueTestEntries.begin(); it != getKeyAndValueTestEntries.end(); ++it)
  103. {
  104. i++;
  105. std::string keyAtStart("predefinedKey["+it->testString+"]");
  106. std::string valueAtStart("prdefinedValue["+it->testString+"]");
  107. std::string key(keyAtStart);
  108. std::string value(valueAtStart);
  109. std::stringstream ss;
  110. ss << it->testString;
  111. EXPECT_EQ(it->expectedResult, credsBackend.getKeyAndValue(ss, it->loc, key, value))
  112. << "Result code in case no: "<< i << " [" + it->testString + "] was wrong." <<std::endl;
  113. if (it->expectedResult) {
  114. //key and value shall be set if getKeyAndValue returns true
  115. EXPECT_EQ(it->key, key) << "A in case no# " << i <<std::endl;
  116. EXPECT_EQ(it->value, value) << "B in case no# " << i <<std::endl;
  117. } else {
  118. //key and value should not be changed if getKeyAndValue returns false
  119. EXPECT_EQ(key, keyAtStart) << "C in case no# " << i <<std::endl;
  120. EXPECT_EQ(value, valueAtStart) << "D in case no# " << i <<std::endl;
  121. }
  122. }
  123. }
  124. /*** Tests for interpretValue() ***/
  125. TEST(parser, interpretValue_OK) {
  126. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  127. {"pid", CLIENT_METHOD_PID}};
  128. int method = NOT_A_METHOD_CODE;
  129. bool occurred = false;
  130. EXPECT_TRUE(credsBackend.interpretValue(clientCredsMap, method, "smack", occurred));
  131. EXPECT_TRUE(occurred);
  132. EXPECT_EQ(CLIENT_METHOD_SMACK, method);
  133. }
  134. TEST(parser, interpretValueKeyNotInMap1) {
  135. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  136. {"pid", CLIENT_METHOD_PID}};
  137. int method = NOT_A_METHOD_CODE;
  138. bool occurred = false;
  139. EXPECT_FALSE(
  140. credsBackend.interpretValue(clientCredsMap, method, "NeitherSmackNorPid", occurred));
  141. EXPECT_TRUE(occurred);
  142. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  143. }
  144. TEST(parser, interpretValueKeyNotInMap2) {
  145. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  146. {"pid", CLIENT_METHOD_PID}};
  147. int method = NOT_A_METHOD_CODE;
  148. bool occurred = true;
  149. EXPECT_FALSE(
  150. credsBackend.interpretValue(clientCredsMap, method, "NeitherSmackNorPid", occurred));
  151. EXPECT_TRUE(occurred);
  152. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  153. }
  154. TEST(parser, interpretValueKeyAppearsAgain) {
  155. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  156. {"pid", CLIENT_METHOD_PID}};
  157. int method = NOT_A_METHOD_CODE;
  158. bool occurred = true;
  159. EXPECT_FALSE(
  160. credsBackend.interpretValue(clientCredsMap, method, "smack", occurred));
  161. EXPECT_TRUE(occurred);
  162. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  163. }
  164. TEST(parser, interpretValueKeyEmptyKey) {
  165. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  166. {"pid", CLIENT_METHOD_PID}};
  167. int method = NOT_A_METHOD_CODE;
  168. bool occurred = true;
  169. EXPECT_FALSE(
  170. credsBackend.interpretValue(clientCredsMap, method, "", occurred));
  171. EXPECT_TRUE(occurred);
  172. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  173. }
  174. TEST(parser, interpretValueEmptyMap1) {
  175. static const CredentialsMap clientCredsMap{};
  176. int method = NOT_A_METHOD_CODE;
  177. bool occurred = false;
  178. EXPECT_FALSE(
  179. credsBackend.interpretValue(clientCredsMap, method, "Anything", occurred));
  180. EXPECT_TRUE(occurred);
  181. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  182. }
  183. TEST(parser, interpretValueEmptyMap2) {
  184. static const CredentialsMap clientCredsMap{};
  185. int method = NOT_A_METHOD_CODE;
  186. bool occurred = true;
  187. EXPECT_FALSE(
  188. credsBackend.interpretValue(clientCredsMap, method, "Anything", occurred));
  189. EXPECT_TRUE(occurred);
  190. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  191. }
  192. /*** Tests for getMethodFromConfigurationFileOK ***/
  193. TEST(parser, getMethodFromConfigurationFileOK2Lines) {
  194. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  195. {"pid", CLIENT_METHOD_PID}};
  196. int method = NOT_A_METHOD_CODE;
  197. FakeCredsCommonsInnerBackend fakeBackend;
  198. EXPECT_CALL(fakeBackend, getKeyAndValue(_, _, _, _))
  199. .WillOnce(DoAll(SetArgReferee<2>("client_default"), SetArgReferee<3>("smack"), Return(true)))
  200. .WillOnce(Return(false));
  201. EXPECT_CALL(fakeBackend, interpretValue(_, _,"smack", Eq(false)))
  202. .WillOnce(DoAll(SetArgReferee<1>(CLIENT_METHOD_SMACK), SetArgReferee<3>(true),
  203. Return(true)));
  204. std::istringstream iss("unimportant as the configuration file content is mocked above");
  205. EXPECT_EQ(CYNARA_API_SUCCESS,
  206. fakeBackend.getMethodFromConfigurationFile(iss, clientCredsMap, "client_default",
  207. method));
  208. EXPECT_EQ(CLIENT_METHOD_SMACK, method);
  209. }
  210. TEST(parser, getMethodFromConfigurationFileOK3Lines) {
  211. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  212. {"pid", CLIENT_METHOD_PID}};
  213. int method = NOT_A_METHOD_CODE;
  214. FakeCredsCommonsInnerBackend fakeBackend;
  215. EXPECT_CALL(fakeBackend, getKeyAndValue(_, _, _, _))
  216. .WillOnce(DoAll(SetArgReferee<2>("user_default"), SetArgReferee<3>("uid"), Return(true)))
  217. .WillOnce(DoAll(SetArgReferee<2>("client_default"), SetArgReferee<3>("smack"), Return(true)))
  218. .WillOnce(Return(false));
  219. EXPECT_CALL(fakeBackend, interpretValue(_, _,"smack", Eq(false)))
  220. .WillOnce(DoAll(SetArgReferee<1>(CLIENT_METHOD_SMACK), SetArgReferee<3>(true),
  221. Return(true)));
  222. std::istringstream iss("unimportant as the configuration file content is mocked above");
  223. EXPECT_EQ(CYNARA_API_SUCCESS,
  224. fakeBackend.getMethodFromConfigurationFile(iss, clientCredsMap, "client_default",
  225. method));
  226. EXPECT_EQ(CLIENT_METHOD_SMACK, method);
  227. }
  228. TEST(parser, getMethodFromConfigurationFileBadNoEntry) {
  229. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  230. {"pid", CLIENT_METHOD_PID}};
  231. int method = NOT_A_METHOD_CODE;
  232. FakeCredsCommonsInnerBackend fakeBackend;
  233. EXPECT_CALL(fakeBackend, getKeyAndValue(_, _, _, _))
  234. .Times(4)
  235. .WillOnce(DoAll(SetArgReferee<2>("A"), SetArgReferee<3>("smack"), Return(true)))
  236. .WillOnce(DoAll(SetArgReferee<2>("B"), SetArgReferee<3>("smack"), Return(true)))
  237. .WillOnce(DoAll(SetArgReferee<2>("client_default"), SetArgReferee<3>("someWrongValue"), Return(true)))
  238. .WillOnce(Return(false));
  239. //user default is not in the file (contrary to A,B, client_default)
  240. std::istringstream iss("unimportant as the configuration file content is mocked above");
  241. EXPECT_EQ(CYNARA_API_CONFIGURATION_ERROR,
  242. fakeBackend.getMethodFromConfigurationFile(iss, clientCredsMap, "user_default",
  243. method));
  244. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  245. }
  246. TEST(parser, getMethodFromConfigurationFileBadValueInEntry) {
  247. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  248. {"pid", CLIENT_METHOD_PID}};
  249. int method = NOT_A_METHOD_CODE;
  250. FakeCredsCommonsInnerBackend fakeBackend;
  251. EXPECT_CALL(fakeBackend, getKeyAndValue(_, _, _, _))
  252. .Times(3)
  253. .WillOnce(DoAll(SetArgReferee<2>("someOtherKey"), SetArgReferee<3>("smack"), Return(true)))
  254. .WillOnce(DoAll(SetArgReferee<2>("user_default"), SetArgReferee<3>("smack"), Return(true)))
  255. //the someWrongValue does not matter this time
  256. .WillOnce(DoAll(SetArgReferee<2>("client_default"), SetArgReferee<3>("someWrongValue"), Return(true)));
  257. EXPECT_CALL(fakeBackend, interpretValue(clientCredsMap, _, "someWrongValue", Eq(false)))
  258. .WillOnce(Return(false));
  259. std::istringstream iss("unimportant as the configuration file content is mocked above");
  260. EXPECT_EQ(CYNARA_API_CONFIGURATION_ERROR,
  261. fakeBackend.getMethodFromConfigurationFile(iss, clientCredsMap, "client_default",
  262. method));
  263. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  264. }
  265. TEST(parser, getMethodFromConfigurationFileBadTwoEntries) {
  266. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  267. {"pid", CLIENT_METHOD_PID}};
  268. int method = NOT_A_METHOD_CODE;
  269. FakeCredsCommonsInnerBackend fakeBackend;
  270. EXPECT_CALL(fakeBackend, getKeyAndValue(_, _, _, _))
  271. .Times(3)
  272. .WillOnce(DoAll(SetArgReferee<2>("someOtherKey"), SetArgReferee<3>("smack"), Return(true)))
  273. .WillOnce(DoAll(SetArgReferee<2>("client_default"), SetArgReferee<3>("smack"), Return(true)))
  274. //the someWrongValue does not matter this time
  275. .WillOnce(DoAll(SetArgReferee<2>("client_default"), SetArgReferee<3>("someWrongValue"), Return(true)));
  276. EXPECT_CALL(fakeBackend, interpretValue(_, _, "smack", Eq(false)))
  277. .WillOnce(DoAll(SetArgReferee<1>(CLIENT_METHOD_SMACK), SetArgReferee<3>(true),
  278. Return(true)));
  279. EXPECT_CALL(fakeBackend, interpretValue(clientCredsMap, _, "someWrongValue", Eq(true)))
  280. .WillOnce(Return(false));
  281. std::istringstream iss("unimportant as the configuration file content is mocked above");
  282. EXPECT_EQ(CYNARA_API_CONFIGURATION_ERROR,
  283. fakeBackend.getMethodFromConfigurationFile(iss, clientCredsMap, "client_default",
  284. method));
  285. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  286. }
  287. TEST(parser, getMethodFromConfigurationFileManyStrangeKeyAndValues) {
  288. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  289. {"pid", CLIENT_METHOD_PID}};
  290. int method;
  291. FakeGetKeyAndValueBackend fakeBackend;
  292. EXPECT_CALL(fakeBackend, getKeyAndValue(_, _, _, _))
  293. .WillOnce(DoAll(SetArgReferee<2>("key1"), SetArgReferee<3>("value1"), Return(true)))
  294. .WillOnce(DoAll(SetArgReferee<2>("key2"), SetArgReferee<3>("value2"), Return(true)))
  295. .WillOnce(DoAll(SetArgReferee<2>("key3"), SetArgReferee<3>("value3"), Return(true)))
  296. .WillOnce(DoAll(SetArgReferee<2>("key4"), SetArgReferee<3>("value4"), Return(true)))
  297. .WillOnce(DoAll(SetArgReferee<2>(""), SetArgReferee<3>(""), Return(true)))
  298. .WillOnce(DoAll(SetArgReferee<2>("client_default"), SetArgReferee<3>("pid"), Return(true)))
  299. .WillOnce(DoAll(SetArgReferee<2>(""), SetArgReferee<3>(""), Return(true)))
  300. .WillOnce(DoAll(SetArgReferee<2>("key5"), SetArgReferee<3>("value5"), Return(true)))
  301. .WillOnce(Return(false));
  302. std::istringstream iss("unimportant as the configuration file content is mocked above");
  303. EXPECT_EQ(CYNARA_API_SUCCESS,
  304. fakeBackend.getMethodFromConfigurationFile(iss, clientCredsMap, "client_default",
  305. method));
  306. EXPECT_EQ(CLIENT_METHOD_PID, method);
  307. }
  308. TEST(parser, getMethodFromConfigurationFileFoundTheKeyAgain) {
  309. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  310. {"pid", CLIENT_METHOD_PID}};
  311. int method = NOT_A_METHOD_CODE;
  312. FakeGetKeyAndValueBackend fakeBackend;
  313. EXPECT_CALL(fakeBackend, getKeyAndValue(_, _, _, _))
  314. .WillOnce(DoAll(SetArgReferee<2>("client_default"), SetArgReferee<3>("smack"),
  315. Return(true)))
  316. .WillOnce(DoAll(SetArgReferee<2>("user_default"), SetArgReferee<3>("gid"),
  317. Return(true)))
  318. .WillOnce(DoAll(SetArgReferee<2>("client_default"), SetArgReferee<3>("smack"),
  319. Return(true)));
  320. std::istringstream iss("unimportant as the configuration file content is mocked above");
  321. EXPECT_EQ(CYNARA_API_CONFIGURATION_ERROR,
  322. fakeBackend.getMethodFromConfigurationFile(iss, clientCredsMap, "client_default",
  323. method));
  324. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  325. }
  326. TEST(parser, getMethodFromConfigurationFileTheKeyNotFound) {
  327. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  328. {"pid", CLIENT_METHOD_PID}};
  329. int method = NOT_A_METHOD_CODE;
  330. FakeGetKeyAndValueBackend fakeBackend;
  331. EXPECT_CALL(fakeBackend, getKeyAndValue(_, _, _, _))
  332. .WillOnce(DoAll(SetArgReferee<2>("something_default"), SetArgReferee<3>("smack"),
  333. Return(true)))
  334. .WillOnce(DoAll(SetArgReferee<2>("user_default"), SetArgReferee<3>("gid"),
  335. Return(true)))
  336. .WillOnce(DoAll(SetArgReferee<2>("other_default"), SetArgReferee<3>("smack"),
  337. Return(true)))
  338. .WillOnce(Return(false));
  339. std::istringstream iss("unimportant as the configuration file content is mocked above");
  340. EXPECT_EQ(CYNARA_API_CONFIGURATION_ERROR,
  341. fakeBackend.getMethodFromConfigurationFile(iss, clientCredsMap, "client_default",
  342. method));
  343. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  344. }
  345. TEST(parser, getMethodFromConfigurationFileFoundTheKeyWithWrongValue) {
  346. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  347. {"pid", CLIENT_METHOD_PID}};
  348. int method = NOT_A_METHOD_CODE;
  349. FakeGetKeyAndValueBackend fakeBackend;
  350. EXPECT_CALL(fakeBackend, getKeyAndValue(_, _, _, _))
  351. .Times(2)
  352. .WillOnce(DoAll(SetArgReferee<2>("user_default"), SetArgReferee<3>("gid"), Return(true)))
  353. .WillOnce(DoAll(SetArgReferee<2>("client_default"), SetArgReferee<3>("noSmackNoPid"),
  354. Return(true)));
  355. std::istringstream iss("unimportant as the configuration file content is mocked above");
  356. EXPECT_EQ(CYNARA_API_CONFIGURATION_ERROR,
  357. fakeBackend.getMethodFromConfigurationFile(iss, clientCredsMap, "client_default",
  358. method));
  359. EXPECT_EQ(NOT_A_METHOD_CODE, method);
  360. }
  361. TEST(parser, getMethodFromConfigurationFileWithoutMockupFileOK) {
  362. static const CredentialsMap clientCredsMap{{"smack", CLIENT_METHOD_SMACK},
  363. {"pid", CLIENT_METHOD_PID}};
  364. int method = NOT_A_METHOD_CODE;
  365. CredsCommonsInnerBackend backend;
  366. std::istringstream iss("client_default=smack\nuser_default=uid");
  367. EXPECT_EQ(CYNARA_API_SUCCESS,
  368. backend.getMethodFromConfigurationFile(iss, clientCredsMap, "client_default",
  369. method));
  370. EXPECT_EQ(CLIENT_METHOD_SMACK, method);
  371. }