Fix has_label() function name

This commit is contained in:
Timofey Turenko
2019-09-16 12:17:12 +03:00
parent bdfd7341e7
commit ea95d9a523
3 changed files with 4 additions and 4 deletions

View File

@ -23,9 +23,9 @@ std::string get_mdbci_lables(const char *labels_string)
return mdbci_labels; return mdbci_labels;
} }
bool check_label(std::string labels, std::string label) bool has_label(std::string labels, std::string label)
{ {
std::string labels_ext = std::string(";") + labels + std::string(";"); std::string labels_ext = ";" + labels + ";";
std::string label_ext = std::string(";") + label + std::string(";"); std::string label_ext = std::string(";") + label + std::string(";");
return (labels_ext.find(label_ext, 0) != std::string::npos); return (labels_ext.find(label_ext, 0) != std::string::npos);
} }

View File

@ -36,4 +36,4 @@ std::string get_mdbci_lables(const char * labels_string);
* @param label Labels to find * @param label Labels to find
* @return true if label present * @return true if label present
*/ */
bool check_label(std::string labels, std::string label); bool has_label(std::string labels, std::string label);

View File

@ -299,7 +299,7 @@ TestConnections::TestConnections(int argc, char* argv[])
mdbci_labels = get_mdbci_lables(labels); mdbci_labels = get_mdbci_lables(labels);
if (check_label(std::string(labels), "BACKEND_SSL")) if (has_label(std::string(labels), "BACKEND_SSL"))
{ {
backend_ssl = true; backend_ssl = true;
tprintf("Test has BACKEND_SSL label"); tprintf("Test has BACKEND_SSL label");