<< dump());
}
+void Admin::erasePolicies(const char *startBucket, int recursive,
+ const char *client, const char *user, const char *privilege,
+ int expectedResult)
+{
+ int ret = cynara_admin_erase(m_admin,
+ startBucket, recursive,
+ client, user, privilege);
+
+ auto dump = [&]() -> std::string
+ {
+ std::stringstream s;
+ s << " functionReturn: " << ret << ","
+ << " functionExpectedReturn: " << expectedResult << ",";
+
+ s << " startBucket: " << formatCstr(startBucket) << ","
+ << " recursive: " << recursive << ","
+ << " client: " << formatCstr(client) << ","
+ << " user: " << formatCstr(user) << ","
+ << " privilege: " << formatCstr(privilege);
+
+ return s.str();
+ };
+
+ RUNNER_ASSERT_MSG(ret == expectedResult,
+ "cynara_admin_erase returned wrong value: "
+ << ret << " != " << expectedResult << "."
+ << dump());
+}
+
} // namespace CynaraTestAdmin
const char *client, const char *user, const char *privilege,
CynaraPoliciesContainer &expectedPolicyList,
int expectedResult = CYNARA_API_SUCCESS);
+ void erasePolicies(const char *startBucket, int recursive,
+ const char *client, const char *user, const char *privilege,
+ int expectedResult = CYNARA_API_SUCCESS);
private:
struct cynara_admin *m_admin;