mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
ensuring no duplicate rx hostname port combo (#604)
* rx_hostname and port combo to one, or hostname to all, or a vector of hostnames and ports, ignoring none or empty, then verifying no duplicates for the host port combo including from shared memory * extracted function for rx_hostname (#694) * c++14 revert * unique hostname-port combo for port, hostname, rx_tcpport (#696) * verify unique combo for rx_port as well * check unique hostname-port combo also when setting control port, hostname, rx_hostname and rx_tcpport --------- Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com> Co-authored-by: Erik Frojdh <erik.frojdh@psi.ch>
This commit is contained in:
@ -108,6 +108,21 @@ TEST_CASE("replace --help") {
|
||||
REQUIRE(s == "list");
|
||||
}
|
||||
|
||||
TEST_CASE("port host") {
|
||||
std::string hostport = "localhost:1954";
|
||||
auto res = ParseHostPort(hostport);
|
||||
REQUIRE(res.first == "localhost");
|
||||
REQUIRE(res.second == 1954);
|
||||
}
|
||||
|
||||
TEST_CASE("port missing") {
|
||||
// TODO! is this the intended result?
|
||||
std::string host = "localhost";
|
||||
auto res = ParseHostPort(host);
|
||||
REQUIRE(res.first == "localhost");
|
||||
REQUIRE(res.second == 0);
|
||||
}
|
||||
|
||||
// TEST_CASE("concat things not being strings")
|
||||
|
||||
} // namespace sls
|
||||
|
Reference in New Issue
Block a user