| 160 | } |
| 161 | |
| 162 | std::shared_ptr<minifi::Connection> TestPlan::addConnection(const std::shared_ptr<core::Processor>& source_proc, const core::Relationship& source_relationship, const std::shared_ptr<core::Processor>& destination_proc) { |
| 163 | std::stringstream connection_name; |
| 164 | connection_name << source_proc->getUUIDStr() << "-to-" << destination_proc->getUUIDStr(); |
| 165 | std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(flow_repo_, content_repo_, connection_name.str()); |
| 166 | |
| 167 | connection->addRelationship(source_relationship); |
| 168 | |
| 169 | // link the connections so that we can test results at the end for this |
| 170 | connection->setSource(source_proc); |
| 171 | connection->setDestination(destination_proc); |
| 172 | |
| 173 | connection->setSourceUUID(source_proc->getUUID()); |
| 174 | connection->setDestinationUUID(destination_proc->getUUID()); |
| 175 | source_proc->addConnection(connection); |
| 176 | if (source_proc != destination_proc) { |
| 177 | destination_proc->addConnection(connection); |
| 178 | } |
| 179 | relationships_.push_back(connection); |
| 180 | return connection; |
| 181 | } |
| 182 | |
| 183 | std::shared_ptr<core::controller::ControllerServiceNode> TestPlan::addController(const std::string &controller_name, const std::string &name) { |
| 184 | if (finalized) { |
no test coverage detected